This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SPI returns 0x0F on any request after random period of time

Hi, im using nRF24L01+ to constantly transmit data and all working fine, but at some point SPI fails and the only returned values I get are 0x0F - doesnt matter which register I try to read or write. Any idea why is that happening?

Thanks, Sergey

Parents
  • Hi,

    If you have "Dynamic Payload Length" enabled (en_dpl in FEATURE register, and "DYNPD" register), the state machine inside the nRF24L01+ can go into a unknown state if you receive a packet which is of length = 0 || length > 32 bytes. I have not seen SPI transaction byte errors in this state, but I have seen the RX deadlock situation.

    What you can do to prevent this is to add a check for your payload length:

    
    void radio_isr()
    {
    ....
    len = read_reg(R_RX_PL_WID);
    if (len == 0 || len > 32) 
      flush_rx_fifo();
    else 
      read_out_payload(&my_payload);
    ....
    }
    
    

    Best regards Håkon

Reply
  • Hi,

    If you have "Dynamic Payload Length" enabled (en_dpl in FEATURE register, and "DYNPD" register), the state machine inside the nRF24L01+ can go into a unknown state if you receive a packet which is of length = 0 || length > 32 bytes. I have not seen SPI transaction byte errors in this state, but I have seen the RX deadlock situation.

    What you can do to prevent this is to add a check for your payload length:

    
    void radio_isr()
    {
    ....
    len = read_reg(R_RX_PL_WID);
    if (len == 0 || len > 32) 
      flush_rx_fifo();
    else 
      read_out_payload(&my_payload);
    ....
    }
    
    

    Best regards Håkon

Children
No Data
Related