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

Antenna Switching for Bluetooth Direction Finding

Hi

I am currently trying to get the antenna switching working on the nRF52833 DK. I have an SPDT RF swtich which I want to use for switching between two antennas. I want to use one of the DFE GPIO control pins to control the RF switch. However I am having trouble with configuring the right GPIO pin. 

Currently I am using 

NRF_RADIO->PSEL.DFEGPIO[0] = 0x00000011; //(P0.17)
NRF_RADIO->SWITCHPATTERN = 0x1; // P0.17 active

I just had two questions:

1. What are the right GPIO pins to use on the board for this function. Can the pins P0.17 and P1.08 be used?

2. And how do I configure these pins correctly?

Thanks

Parents
  • Hi,

    1. You can use any pins that is not marked as "Standard drive, low frequency I/O only" (see ch. 7.1 in product specification)

    2. You didn't mention what RF switch you have, assuming it has a single control input. A switch pattern should consist of at least four entries -  one for the time before CTE, one for the reference period, next two (or more) for each sampling slot. An example of (I believe) the right config in your case:

    NRF_RADIO->PSEL.DFEGPIO[0] = 0x00000011; //(P0.17)
    NRF_RADIO->SWITCHPATTERN = 0x0; // before CTE - antenna 1
    NRF_RADIO->SWITCHPATTERN = 0x0; // reference - antenna 1
    NRF_RADIO->SWITCHPATTERN = 0x0; // slots 0, 2, 4... - antenna 1
    NRF_RADIO->SWITCHPATTERN = 0x1; // slots 1, 3, 5... - antenna 2

Reply
  • Hi,

    1. You can use any pins that is not marked as "Standard drive, low frequency I/O only" (see ch. 7.1 in product specification)

    2. You didn't mention what RF switch you have, assuming it has a single control input. A switch pattern should consist of at least four entries -  one for the time before CTE, one for the reference period, next two (or more) for each sampling slot. An example of (I believe) the right config in your case:

    NRF_RADIO->PSEL.DFEGPIO[0] = 0x00000011; //(P0.17)
    NRF_RADIO->SWITCHPATTERN = 0x0; // before CTE - antenna 1
    NRF_RADIO->SWITCHPATTERN = 0x0; // reference - antenna 1
    NRF_RADIO->SWITCHPATTERN = 0x0; // slots 0, 2, 4... - antenna 1
    NRF_RADIO->SWITCHPATTERN = 0x1; // slots 1, 3, 5... - antenna 2

Children
Related