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

nRF24LU1+ spi program communication

Goodmorning,

while performing an SPI read with command 0x03, the nRF24 is sending data during command and address transmission. Is it right?

Thanks

Parents
  • Hi,

     

    while performing an SPI read with command 0x03, the nRF24 is sending data during command and address transmission. Is it right?

    If you are asking if the SPI read function is full duplex, yes, it is. You can get data shifted back on MISO while you're shifting data on MOSI. This is usually a one-command lag, meaning that the next transmission will return the data from the former command.

     

    Kind regards,

    Håkon

  • Hi,

    thanks for reply, so just for confirmation, if I want to read 2 bytes starting from address 0, I should send:

    0x03 (meaning READ commad), 0x00 (MSB address), 0x00 (LSB address), 0x00 (dummy send for byte 1), 0x00 (dummy send for byte 2).

    This is what I get:

    First transaction.

    MOSI -> 0x03, 0x00, 0x00, 0x00, 0x00

    MISO -> 0x00, 0x78, 0x78, 0x02, 0x78

    Second transaction after the previous.

    MOSI -> 0x03, 0x00, 0x00, 0x00, 0x00

    MISO -> 0x00, 0x00, 0x00, 0x02, 0x78

    The requested two bytes are the latest from MISO, is it right?

    The first 3 bytes from MISO can be ignored, is it correct?

    Thanks.

Reply
  • Hi,

    thanks for reply, so just for confirmation, if I want to read 2 bytes starting from address 0, I should send:

    0x03 (meaning READ commad), 0x00 (MSB address), 0x00 (LSB address), 0x00 (dummy send for byte 1), 0x00 (dummy send for byte 2).

    This is what I get:

    First transaction.

    MOSI -> 0x03, 0x00, 0x00, 0x00, 0x00

    MISO -> 0x00, 0x78, 0x78, 0x02, 0x78

    Second transaction after the previous.

    MOSI -> 0x03, 0x00, 0x00, 0x00, 0x00

    MISO -> 0x00, 0x00, 0x00, 0x02, 0x78

    The requested two bytes are the latest from MISO, is it right?

    The first 3 bytes from MISO can be ignored, is it correct?

    Thanks.

Children
Related