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

BLE CRCINIT value is 0x555555?

I am getting BLE working on an nRF52832, and I am a bit confused as to what I should be setting RADIO->CRCINIT to. I was hoping someone could clear this up, which is more about understanding BLE CRC calculation than the hardware itself.

From what I've gathered, there are two ways to implement a CRC generator, a "direct" way and an "indirect" way, as illustrated in this StackOverflow question. Preset values must be transformed between implementations, since their effect on the output is different according to the implementation.

The Bluetooth Core Specification Version 5.0 (Vol 6, Part B, 3.1.1) states that the shift register is preset with 0x555555, and gives the following "direct" implementation as an example:

In the RADIO section of the nRF52832 specification, an "indirect" implementation is shown. I would expect this means the preset value of 0x555555 needs to be transformed to fit this implementation, but looking through working code (namely the code from Mynewt which I was using before) the value is directly set to 0x555555.

Although I am setting CRCINIT to 0x555555 for now, I feel that I am missing something and I would really appreciate it if someone could clear this up for me.

Related