AnsweredAssumed Answered

How can whitening be enabled on the MKW36 development board?

Question asked by Felix Divo on Aug 15, 2019
Latest reply on Aug 16, 2019 by Felix Divo

Hello,

 

I currently have difficulties enabling whitening on RX frames on the NXP FRDM MKW36 development board. The goal is to develop a basic Bluetooth Low Energy (BLE) 4.2 stack on top of the Generic FSK (GENFSK) link layer.

 

Receiving frames works just fine, except that whitening is not applied to them. Thus handling of the length field and CRC checking in hardware are not possible. I verified the lack of whitening with an external sniffer/radio logic analyzer (see appendix). AFAIK the correct registers are set, but can you please list the necessary registers? I did configure these (C-style pseudo-code):

 

RX_WHITEN_DIS = 0u
TX_WHITEN_DIS = 0u
WHITEN_START = 0b01u
WHITEN_SZ_THR = 0u
WHITEN_PAYLOAD_INIT = 0u
WHITEN_END = 1u

WHITEN_SZ = 7u
WHITEN_INIT = (reverse_bits_of_byte(ble_channel_index) >> 1) | 1u
WHITEN_POLY = 0b1000100u
WHITEN_POLY_TYPE = 0u
WHITEN_B4_CRC = 0u
WHITEN_REF_IN = 0u

 

Are the above settings sufficient? What is required to enable whitening?

What might cause the whitening to not be applied?

 

As a side note: I noticed "WHITEN_SEED[31:0]" and "WHITEN_SEED[8:0]" being mentioned in the Reference Manual on a few pages (pp. 1927, 1930, 1947, 1948), but there is no actual register being called like that. Shouldn't it have been WHITEN_INIT? You can find it with Ctrl+F and the word "WHITEN_SEED".

 

Sadly I could not find any examples of BLE being developed on the GENFSK stack.

 

Thanks a lot in advance!

 

Regards

Felix

 

Appendix: Example of a received frame and what would be the expected frame

As I receive it (i.e. without whitening):

D6 E4 0D 20 59 DE B3 A9 19 A4 B5 41 78 F0 33
73 14 72 23 D0 20 EE B3 1F 49 3B F7 44 29 2B
E3 20 61 E0 E6 56 36 9E

As it should show up in the packet buffer:

00 21 49 00 00 00 52 26 02 01 1A 03 03 BE FE
13 FF 10 01 40 0C 01 43 D8 C4 E9 A0 E5 14 8C
85 90 14 D1 F7 1E A0 E9

Outcomes