How to choose the control pins for the NRF21540 when linking with a NRF52840 ?

Hi,

We are designing a board that is controlled by a NRF52840 and that will use a NRF21540 (FEM) to enhance its radio link budget.

We will use the FEM with diversity antenna. We intend to switch power and antenna depending on the node the system is talking to, in order to get the best link margin possible.

Furthermore our NRF52840 use a QSPI flash memory for storing data.

According to the NRF21540-DK the pin controls are both SPI and IO and on the DK,

  • the IO are HIGH-speed 40MHz pins
  • the SPI pins are LOW-speed

As the HIGH-speed pins are used on our design for the QSPI and other HIGH-speed pins are used for I2C 2x, UART 2x, SPI 1x, and SDCard, we need to know if the HIGH-speed pins on the NRF21840 are necessary for our application.

Further questions arise if HIGH-speed control pins are necessary:

  1. can we control the FEM only with SPI ? Our idea is to use the same HIGH-speed spi for the FEM and our other peripherals
  2. If the SPI used to control the FEM is HIGH-speed, do we have equivalent control than with the DK choice: a IO HIGH-speed and a SPI LOW-speed ?
    1. If no, what do we loose ? 

- Best regards,

Parents
  • Hi,

    The GPIO control pins for the nRF21540 can be the low frequency pins and does not need to the ones capable of higher than 10kHz.

    can we control the FEM only with SPI ? Our idea is to use the same HIGH-speed spi for the FEM and our other peripherals

    Yes, all functions beside the PDN control can be controlled through the SPI interface. So when only using the SPI interface the PDN pin is still needed to enter/exit the power down state. One thing to note is that there is no software support for only using the SPI interface, so if using this configuration you would have to implement this functionality yourself.

    If the SPI used to control the FEM is HIGH-speed, do we have equivalent control than with the DK choice: a IO HIGH-speed and a SPI LOW-speed ?
    1. If no, what do we loose ? 

    The SPI interface is slower at changing into the TX and RX states than using the GPIO, so the nRF21540 must be powered up earlier. This causes the nRF21540 to be out of the power down state more and increases the average power draw. Other than this there should be the same functionality as using the GPIO + SPI control.

     

    Best regards,

    Bendik

  • Hi Bendik,

    The GPIO control pins for the nRF21540 can be the low frequency pins and does not need to the ones capable of higher than 10kHz.

    Thanks

    So as the GPIO control pins for the nRF21540 are settled and cleared before and after the RF Tx and Rx they are not creating interferences on the RF? right?

    The 10kHz GPIO are limited by hardware or only by software to ensure there are no risk of spurious on the RF during RF communication?

    Into the nRF21540-DK, the SPI control for the nRF21540 are on the low frequency pins but max speed is 8MHz, so it is possible to use theses LFIO at higher speed than 10kHz, right? 

    If Yes, we must ensure that the high speed communications are not performed during RF communication?

    The SPI interface is slower at changing into the TX and RX states than using the GPIO, so the nRF21540 must be powered up earlier. This causes the nRF21540 to be out of the power down state more and increases the average power draw. Other than this there should be the same functionality as using the GPIO + SPI control.

    Regarding your answer, I understand that to use the SPI as the main control for the nRF21540, we must anticipate to set the register increasing the mean consumption, but it is possible for BLE 2M too?

    We will probably use GPIO control pins  for the nRF21540 on LFIOs and SPI on HFIOs (shared bus), with all CS on LFIOs.

    Is there any risk of trouble?

    Best Regards, 

    Joel

Reply
  • Hi Bendik,

    The GPIO control pins for the nRF21540 can be the low frequency pins and does not need to the ones capable of higher than 10kHz.

    Thanks

    So as the GPIO control pins for the nRF21540 are settled and cleared before and after the RF Tx and Rx they are not creating interferences on the RF? right?

    The 10kHz GPIO are limited by hardware or only by software to ensure there are no risk of spurious on the RF during RF communication?

    Into the nRF21540-DK, the SPI control for the nRF21540 are on the low frequency pins but max speed is 8MHz, so it is possible to use theses LFIO at higher speed than 10kHz, right? 

    If Yes, we must ensure that the high speed communications are not performed during RF communication?

    The SPI interface is slower at changing into the TX and RX states than using the GPIO, so the nRF21540 must be powered up earlier. This causes the nRF21540 to be out of the power down state more and increases the average power draw. Other than this there should be the same functionality as using the GPIO + SPI control.

    Regarding your answer, I understand that to use the SPI as the main control for the nRF21540, we must anticipate to set the register increasing the mean consumption, but it is possible for BLE 2M too?

    We will probably use GPIO control pins  for the nRF21540 on LFIOs and SPI on HFIOs (shared bus), with all CS on LFIOs.

    Is there any risk of trouble?

    Best Regards, 

    Joel

Children
  • One thing to have in mind is that the SPI control of the nRF21540 must be synchronized with the radio traffic. That will necessitate that the SPI module is not busy when the radio is going to be active. You can achieve this through the use of the timeslot API. This will put restrictions on what you can combine with FEM control/gain setting on the SPIM to get this working. Locking up the SPI for other tasks when the radio is to operate will cause failures/fallback to default settings.

Related