MSP430G2553 SPI to nRF24l01+

SPI example for MSP430G2553 talking to Nordic nRF24l01+ using mps430-gcc on Linux

This example shows how to use SPI on USCI_B of the MSP430g2553 to communicate to a Nordic NRF24l01+ module. It simply reads out the configuration register of the NRF and prints out the result in binary on the UART at USCI_A at 9600 bauds.

1. Hardware Setup

The wiring for this example is as follows:

MSP430 To
RXD P1.1 TXD serial line
TXD P1.2 RXD serial line
SCLK P1.5 NRF SCK
SOMI P1.6 NRF MO
SIMO P1.7 NRF MI
CS P1.3 NRF CS

For the NRF also connect the following:

MSP430 To
NRF To
VCC 3.3v
CE 3.3v
GND GND
MSP430G2553 wired to nRF24l01+

MSP430G2553 wired to nRF24l01+

Note: When using the TI Launchpad, “/dev/ttyACM0″ could be used as serial port at 9600 Bauds, but RX/TX must be crossed on the jumper bridge of the Launchpad.

2. Get the sources

You can download the sources on github:

git clone http://github.com/wendlers/msp430-spi-nrfreg.git

3. Compilation

This project is written for msp430-gcc on Linux (I used v4.5.3 which is available as package on Ubuntu). For flashing the “mspdebug” tool was used (also from the Ubuntu package).

To compile the source just issue a:

make

This builds the firmware in the “bin” subdirectory in various formats.

4. Flashing

To flash the firmware to your Launchpad through “mspdebug”, you could use the “flash-target” make target:

make flash-target

5. Doxygen Docs

If you installed doxygen on your system, you could generate the HTML-based documentation by calling:

make gen-docs

This will create the documentation under “doc/gen/html”.

6. Usage

Connecting your Launchpad should give you a new serial device “/dev/ttyACM0″. Connect to this port at 9600 bauds – e.g. by using screen:

screen /dev/ttyACM0 9600

After resetting the Launchpad, the configuration register of the NRF should be printed out on the serial line (status should return a value of 14 and config a value of 8).

3 Comments to MSP430G2553 SPI to nRF24l01+

  1. JG's Gravatar JG
    20. Januar 2013 at 09:46 | Permalink

    stefan, once again, thanks a lot, you eased uart & now spi to me, many thanks :)

  2. Fabian's Gravatar Fabian
    24. Februar 2013 at 15:53 | Permalink

    Hey,

    is there any way to get this running on CSS?

Leave a Reply

You must be logged in to post a comment.