SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By Texton
#147882
Hi all.
I am trying to interface my PSoC5 microcontroller with a the Sparkfun transceiver: nRF24L01 through SPI. The data sheet for the transceiver says that it will return the status register every spi-cycle if not given a command.
If I for example send a read-command to the tranceiver, then the register I requested should be available in the next SPI-cycle.

Now, problem is that even though I send a command to the transceiver, it always return the status register - for some reason it doesn't get/understand my commands??

Anyone having any experiences with this or have an idea why it doesn't get/understand my commands?..

Thanks in advance - i am really disparate!!
By Duane Degn
#147963
The CSN line needs to stay low the entire read.

CSN low, SPI write (read + register to read) (the status register can be read as the read command is given).
Next byte with CSN still low, SPI write 0xFF while reading the register value just requested.
CSN should then be set high.

The status should only be returned for the first byte of a SPI read/write (IIRC). Each time CSN goes low starts a new SPI read/write transaction.

Those nRF24L01+ chips are pretty cool, but they are kind of tough to get the hang of (IMO).