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

pipe info in nRF24L01+

from the product spec NOTE: The 3 bit pipe information in the STATUS register is updated during the IRQ pin high to low transition. The pipe information is unreliable if the STATUS register is read during an IRQ pin high to low transition.

It has been mentioned several times in the forum to watch out for this, but the note doesn't make sense (to me). First if you mask the interrupts the IRQ will never change. What happens? Assuming the IRQs are not masked, but there are 2 messages in the RX fifo - After reading the first message at what does the pipe info in the status and length registers reflect the 2nd message, and how are you supposed to reliably read them (assuming you don't exit the interrupt routine)?

thanks mike

Parents
  • Håkon,

    I think the penny just dropped. I suspect that the answer is that the STATUS register is not double buffered and so if the info is latched in the middle of reading the STATUS register the first bits output on the SPI interface will be the old info and the last bits will be the new info.

    Since the bits are transmitted MSB first, by the time the RX_DR is asserted the RX_P_NO will be valid. There does seem to be an issue with TX_FULL as in this case, when the last location is transmitted, one could read the STATUS resgister and TX_DS could be set and TX_FULL could still be set. (TX_DS new info, TX_FULL old info), but I can't imagine any situation in which this would matter.

    On the other hand the note (warning) is in the product spec (and was mentioned several times in this forum by Nordic employees), so I am still a little concerned there is more to this?

    thanks Mike

  • Mike,

    If this note is not fully implemented, you can be in a situation where you get corrupted info. This may give you garbage data.

    You can lock up the state machine inside the radio-core if spec is not followed. An example of this is: A very important thing to always check if dynamic payload length is used, is the payload length. If you read out a payload of > 32 byte, then the state machine will go haywire and most likely lock up your receiver until power-cycle.

    Best regards Håkon

Reply
  • Mike,

    If this note is not fully implemented, you can be in a situation where you get corrupted info. This may give you garbage data.

    You can lock up the state machine inside the radio-core if spec is not followed. An example of this is: A very important thing to always check if dynamic payload length is used, is the payload length. If you read out a payload of > 32 byte, then the state machine will go haywire and most likely lock up your receiver until power-cycle.

    Best regards Håkon

Children
No Data
Related