TXADDRESS, RXADDRESSES registers: what are these and how we can use them?

Based on the NRF Radio manual, the over the air address of the packets, is configured using "BASEn" and "PREFIXn" registers.

However, there are 
also two other registers called "TXADDRESS" and "RXADDRESSES".

ThinkingThinking What is the application of these registers and how we can use them?

My current reading of the specification tells me that these are used to facilitate the filtering of the unwanted packets in the hardware level but I am not sure.

The BLE standard does not seem to have any instructions for this type of addresses (which is called logical addresses sometimes in the NRF Radio specification). Is this something that NRF has designed for extra flexibility and fast filtering and connection?


As far as APIs are concerned, I have found the following:

NRF_RADIO->RXADDRESSES = (uint32_t)(rxaddresses);
NRF_RADIO->TXADDRESS = ((uint32_t)txaddress) << RADIO_TXADDRESS_TXADDRESS_Pos;
 
Could you tell me what does the left shift operation in the second code do? (why we do that)

Thanks
Parents
  • Hi,

     

    The BLE standard does not seem to have any instructions for this type of addresses (which is called logical addresses sometimes in the NRF Radio specification). Is this something that NRF has designed for extra flexibility and fast filtering and connection?

    BLE is a full protocol, requiring loads of handling in firmware, and should not be compared to the register content of the NRF_RADIO peripheral.

    What do you actually want to do here? If you need BLE capabilities, please see bluetooth samples.

    As far as APIs are concerned, I have found the following:

    NRF_RADIO->RXADDRESSES = (uint32_t)(rxaddresses);
    NRF_RADIO->TXADDRESS = ((uint32_t)txaddress) << RADIO_TXADDRESS_TXADDRESS_Pos;
     
    Could you tell me what does the left shift operation in the second code do? (why we do that)

    It shifts the data into the RADIO_TXADDRESS bit position. The bit position of this specific register is at bit 0:

    https://infocenter.nordicsemi.com/topic/ps_nrf52833/radio.html?cp=5_1_0_5_17_14_57#register.TXADDRESS

     

    So, it basically does not shift anything in this scenario, but it is considered "good practice" to include this, in cases where you write to bit fields located on other bit positions.

     

    Kind regards,

    Håkon

  • Hi Hokan, thanks, but could you also answer my first question? What is the purpose of these registers? Also, I intentionally mentioned the BLE standard to highlight the fact that this "logical address" is not being discussed anywhere except in the NRF Radio document. Any ways, my main question is what is the purpose of these addresses and what uses that.

  • Hi,

     

    Please see this chapter:

    https://infocenter.nordicsemi.com/topic/ps_nrf52833/radio.html?cp=5_1_0_5_17_1#concept_mdy_kcj_4r

    It is for addressing, a way for the receiver to know which logical address it received a payload on.

     

    Omid said:
    I intentionally mentioned the BLE standard to highlight the fact that this "logical address" is not being discussed anywhere except in the NRF Radio document

    Remember that the nRF5-series radios are backwards compatible with the nRF24-series devices, where some devices are are close to 20 years of age now. There will be features that are not specifically targeted towards Bluetooth LE.

     

    Kind regards,

    Håkon

Reply Children
  • Thanks, I had already read that document. 
    However, I cannot understand from that document how these two logical addresses work:


    1. How these two relate the the air address?

    2. Why we need the logical addresses if we already use the air address?

    3. What happens if I do not use the logical address and only use the air address?


    I appreciate your help. 

  • Omid said:
    1. How these two relate the the air address?

    Please see table 1. in the PS.

    Omid said:

    2. Why we need the logical addresses if we already use the air address?

    You will need the registers and set them according to your needs.

    If you check the register definition for RXADDRESSES, you will see that it enables reception on a given address. You have in total 8 logical addresses, and this register enables/disables each physical RF address.

    Omid said:
    3. What happens if I do not use the logical address and only use the air address?

    A logical address is a lookup table for the on-air address.

    The usage logical vs. on-air address are not mutually exclusive, they are linked to the addressing itself.

     

    Kind regards,

    Håkon

     

  • For a better reference, I am literally copying the document:


    The on-air addresses are defined in the BASE0/BASE1 and PREFIX0/PREFIX1 registers. It is only when writing these registers that the user must relate to the actual on-air addresses. For other radio address registers, such as the TXADDRESS, RXADDRESSES, and RXMATCH registers, logical radio addresses ranging from 0 to 7 are being used. The relationship between the on-air radio addresses and the logical addresses is described in the following table.


    Logical address Base address Prefix byte
    0 BASE0 PREFIX0.AP0
    1 BASE1 PREFIX0.AP1
    2 BASE1 PREFIX0.AP2
    3 BASE1 PREFIX0.AP3
    4 BASE1 PREFIX1.AP4
    5 BASE1 PREFIX1.AP5
    6 BASE1 PREFIX1.AP6
    7 BASE1

    PREFIX1.AP7

    Table 1. Definition of logical addresses

    I cannot simply find the answer of my questions from reading this paragraph.

    Could you please translate this paragraph in plain language?

    I honestly have no idea what "It is only when writing these registers that the user must relate to the actual on-air addresses" is meant to convey to the reader.

    The usage logical vs. on-air address are not mutually exclusive, they are linked to the addressing itself.

    So, it means I can use one with or without the other on my wish????

    Let's say I set up the BASE0 and PREFIX0 to create the air address of a packet to be transmitted.
    However, I do not make any settings for TXADDRESS.
    Will the transmission be done after TASKS_TXEN and TASKS_START? or it won't work?

    Let's say I want to receive packets. 
    However, I do not make any setting for RXADDRESSES.
    Will the reception be done after TASKS_RXEN and TASKS_START? or it won't work?

  • Hi,

     

    Omid said:
    Let's say I set up the BASE0 and PREFIX0 to create the air address of a packet to be transmitted.
    However, I do not make any settings for TXADDRESS.
    Will the transmission be done after TASKS_TXEN and TASKS_START? or it won't work?

    This will leave the TXADDRESS with value '0' (ie. the reset value of the register), which will point to logical address #0, which again is BASE0 combined with PREFIX0.AP0 on-air address.

     

    Omid said:
    Let's say I want to receive packets. 
    However, I do not make any setting for RXADDRESSES.
    Will the reception be done after TASKS_RXEN and TASKS_START? or it won't work?

    As compared to the TXADDRESSES register, which uses the value directly, the RXADDRESSES register is defined as bitfields.

    This is because you can be in RX and receive payloads from RXADDRESSES that you have enabled.

     

    If RXADDRESSES == 0, then you will not receive any payloads, as there's no addresses you're listening to.

    Kind regards,

    Håkon

  • Thank you Hokon, this makes it a lot more clear.


    Just one more follow up question on:

    This is because you can be in RX and receive payloads from RXADDRESSES that you have enabled.

    Does this mean, in the RX mode, we can listen to the air addresses that we provide?

    If so, does it also mean we will only be able to listen to those addresses?

    If so, I am wondering if it means that we can listen to several air addresses at the same time? depending how many base and prefix addresses we provided?

    Thank you very much.

Related