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

A few questions about NRF_RADIO registers

Hi,

I have a basic setup consisting of a time-slotted transmitter and receiver so that I can experiment with the raw coded and uncoded modes, exploring all the NRF_RADIO registers. I have a few  questions:

1. How is the whitening initial value applied ? I read that it should be set to the channel index (= FREQUENCY register?) but this doesn't work for me and I get CRC errors. If I enable whitening but do nothing with the IV register, everything is fine. The IV register seems to have a range of 64, since bit 6 is hardwired to be 1, so I don't see how that can cover the high channel numbers.

2. What is the correct way to set the LENGTH field in the packet? I understand how to set the length of the length field using LFLEN but it seems that the only way to set LENGTH is to include it in the packet payload at index 0. Is this the correct approach ?

3. Do the fields in the PCNF0 register apply to both Tx and RX modes regardless of MODE, or will, for example, an 8-bit preamble always be transmitted in Nrf_1Mbit mode, and only the receiver apply the PLEN setting ?

Thanks

Pete

Parents
  • Hi Pete,

    1) for BLE packets you need to set DATAWHITEIV to BLE channel number (0-36), not frequency. Bit 6 is always 1.

    2) You can include a length field at position 0 or 1, depending on S0LEN. Another option is to have static length - set PCNF0.LFLEN to 0 and PCNF1.STATLEN to the length of your packet.

    3) I believe, receiver doesn't look at preamble settings in PCNF0 - there is a hardware detection logic that needs at least 8 transitions to sync with a stream, and quite different logic for CODED PHY. Other fields, surely, should match at rx and tx sides.

  • Hi Dmitry,

    Thanks for the feedback. I'm not using BLE so I was wondering how whitening is applied to the non-BLE channels, e.g 2403MHz (FREQUENCY register set to 3).

    Yes, the receiver seems to work regardless of what I set the preamble length to in PCNF0. I am puzzled, though, how frame synchronisation is achieved without a dedicated Sync word between preamble and the address bytes.

    Pete

Reply
  • Hi Dmitry,

    Thanks for the feedback. I'm not using BLE so I was wondering how whitening is applied to the non-BLE channels, e.g 2403MHz (FREQUENCY register set to 3).

    Yes, the receiver seems to work regardless of what I set the preamble length to in PCNF0. I am puzzled, though, how frame synchronisation is achieved without a dedicated Sync word between preamble and the address bytes.

    Pete

Children
  • Thanks for the feedback. I'm not using BLE so I was wondering how whitening is applied to the non-BLE channels, e.g 2403MHz (FREQUENCY register set to 3).

    Then you can use any whitening value, or no whitening at all - just be sure that it matches on tx nd rx sides.

    Yes, the receiver seems to work regardless of what I set the preamble length to in PCNF0. I am puzzled, though, how frame synchronisation is achieved without a dedicated Sync word between preamble and the address bytes.

    Preamble is handled only by phase sync logic - as I experimented, it needs 7-8 transitions to adjust sampling point. A packet without preamble will be received as well, though with higher error rate because sampling point will be at random phase.

Related