This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF8001 echo command

Hello!

I am trying to set up the interface between an ARM Cortex-M4 andthe nRF8001. After RESET I see following data on the MISO line:

(turquoise=REQN/CS - pink=MOSI - blue=CLK - yellow=MISO)

0x80 - 0x20 - 0x81 - 0x40 - 0x00 - 0x40 - 0x00 - 0x00 -  ...

Because the LSB is sent first, the right data is:

0x01 - 0x04 - 0x81 - 0x02 - 0x00 - 0x02 - 0x00 - 0x00 - ....

The third byte is the event - 0x81 - which is the DeviceStartedEvent, is that right?

After that I want to send the ECHO command:

(turquoise=REQN/CS - pink=MOSI - blue=CLK - yellow=MISO)

First byte on MOSI line means lenght? Lenght=32=0010.0000 --> LSB first --> 0000.0100 = 0x04

Second byte on MOSI line means command? ECHO=0x02=0000.0010 -->LSB first --> 0100.0000=0x40.

Is this sequence on the MOSI line right for the ECHO command?

After the echo command is sent, the CS/REQN line has to be pulled high, the nRF8001 pulls the RDYN line also high. When the nRF8001 is ready to sent the echo event it pulls the REQN pin low and the MCU can send dummy bytes to receive data on the MISO pin. Is this approach right?

Thank you for your help!

Parents Reply Children
No Data
Related