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

Received data is not stored in memory

I have an issue where after transmitting a radio package, is setting up the radio as receiver, get indication for reception (have indications for ADRESS and PAYLOAD events, get the END event intterupt, but the data in payload is not the same as the radio packet (have the transmitter to write the payload on the SPI bus) but I get a correct (if I have calculated it correctly) value in the RXCRC register.

I have verified that I set the PACKETPTR register before I set the RXEN task (output the STATE register and it is 0) and that the PACKETPTR has the same value when the END event occure.

What can be the error that cause this to happen?

Parents
  • I admit it is highly unlikely. The compiler can see that you never wrote to the receive buffer. It doesn't know that the radio device does. The compiler can think it is a constant, and put it in flash. But the Nordic docs say it MUST be in RAM and if not you MIGHT get a hard fault (I could be misquoting, see the original.) If it were in FLASH, the radio's write would have no effect and if it did not generate a hard fault...

Reply
  • I admit it is highly unlikely. The compiler can see that you never wrote to the receive buffer. It doesn't know that the radio device does. The compiler can think it is a constant, and put it in flash. But the Nordic docs say it MUST be in RAM and if not you MIGHT get a hard fault (I could be misquoting, see the original.) If it were in FLASH, the radio's write would have no effect and if it did not generate a hard fault...

Children
No Data
Related