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

NRF52 Radio CCM errors

I'm working with a proprietary RF protocol on the nRF52832 rev2. 

I'm noticing that I sometimes receive bad data over the radio even though the CRC is correct (intermittently, ~1/min). 

I believe it is an issue somehow related to encryption, because when I disable encryption in the protocol, everything works as expected, and I do not get any bad data. 

I noticed that in the code, the CCM is configured with the PPI module starting the encryption after the ENDKSGEN event is fired, with a note saying that using the shortcut results in failure with bigger payloads. 

I noticed this in the spec:

In order to match the RADIO’s timing, the KSGEN task must be triggered no later than when the START task in the RADIO is triggered, in addition the shortcut between the ENDKSGEN event and the CRYPT task must be enabled.

So I tried using the shortcut instead of the PPI module and I get no incorrect data even with encryption turned on. But then as the comment said, when I tried sending bigger payloads (up to 240 bytes) I started getting CCM errors. 

This is reproducible on both nRF52 DK and a custom board with PA/LNA

Is this expected? Am I missing something in the spec? 

Also, receiving this bad data only seems to happen when I put the chip to sleep in the main loop using __WFE(), if that is removed, I no longer get incorrect data

I appreciate any help anyone can provide 

Parents Reply Children
No Data
Related