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

nRF24L01+ status register

hello, I'm trying to read the status register but all I am receiving is 1111 1111, I tried to change the code to read RX_ADDR_P0, but I also receive 1111 1111. can you tell e what I am doing wrong or provide me with pseudo code telling me the steps I need to take to read/write to the nrf24l01? for now int terms of setup I'm only configuring register 0. here is how I'm trying to read status:

void STATUS(){
  digitalWrite(CSN, LOW);
  SPI.transfer(0x07);
  SPI.transfer(0b00000000);
  data = SPI.transfer(0xff); //NOP
  digitalWrite(CSN, HIGH);
  Serial.println(data, BIN);
  }
Parents
  • Hi

    If you receive all 1's or all 0's it seems like a SPI connection or configuration issue. Make sure all the signals are connected properly, that you didn't mix up any pins, and that the SPI is configured to be compatible with the nRF24L01+ as detailed in chapter 8.3.2 SPI timing of the nRF24L01+ product specification.

    Also, when reading a configuration register you want to return the second byte read, not the third byte like you do in the attached code.

    Best regards
    Torbjørn

Reply
  • Hi

    If you receive all 1's or all 0's it seems like a SPI connection or configuration issue. Make sure all the signals are connected properly, that you didn't mix up any pins, and that the SPI is configured to be compatible with the nRF24L01+ as detailed in chapter 8.3.2 SPI timing of the nRF24L01+ product specification.

    Also, when reading a configuration register you want to return the second byte read, not the third byte like you do in the attached code.

    Best regards
    Torbjørn

Children
No Data
Related