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

nRF52 CRC OK for corrupt packets

Hello, I am seeing a strange problem with the nRF52 RADIO peripheral: sometimes a packet will be received that is corrupted, but the CRCSTATUS register indicates the CRC is OK. It seems like it's happening too often to be a coincidence where the corrupt packet's CRC happens to match the correct CRC.

I am using an nRF51 transmitting to an nRF52 using modified Micro ESB (for bulk transfer of MBs of data at high speed). It's configured for 2Mbps bit rate and is sending packets with 252 byte payloads. I tried changing the CRC from 16-bit to 24-bit (using the same polynomial as BLE) and enabling data whitening, but this didn't have any effect.

All of the corrupted packets appear to be corrupted in a similar way: The last 17 (sometimes 18) bytes of the 252-byte payload are random garbage. There will also be one (sometimes two) byte at a random location within the payload that is incorrect but only one or two bits of that byte are flipped. The rest of the payload is correct.

Could this be a hardware glitch in the RADIO peripheral's CRC function or maybe a bug or misconfiguration in ESB? I will probably add an additional CRC calculated in software to the payload of each packet to detect and discard the affected packets.

  • Hi Paolo

    I doubt very strongly this is a hardware issue. It sounds more like an issue with the ESB library or the application code.

    Do you have any other peripherals in the system using DMA?

    Do you have any peripherals generating interrupts?
    If so, have you set the interrupt priority to something other than 0? The ESB library might misbehave if it gets interrupted when inside the radio interrupt.

    Do you know how much of the RAM is being used?
    If the CRC is OK but the packet is not, I am tempted to think that some other peripheral or the MCU is overwriting the RAM used by the ESB library.

    Best regards Torbjørn

Related