Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ The following properties are optional for use with the :ref:`GPIO <ug_radio_fem_

* Properties that control the timing of interface signals:

* ``tx-en-settle-time-us`` - Minimal time interval between asserting the ``TX_EN`` signal and starting the radio transmission, in microseconds.
* ``rx-en-settle-time-us`` - Minimal time interval between asserting the ``RX_EN`` signal and starting the radio transmission, in microseconds.
* ``tx-en-settle-time-us`` - Time between asserting the ``TX_EN`` signal and the readiness of the PA for transmission, in microseconds.
The value of :kconfig:option:`CONFIG_MPSL_FEM_NRF21540_PA_LEAD_TIME_ADDITIONAL_US` option is added to the ``tx-en-settle-time-us`` to calculate the moment in time when the ``TX_EN`` signal is asserted before transmission.
* ``rx-en-settle-time-us`` - Time between asserting the ``RX_EN`` signal and the readiness of the LNA for reception, in microseconds.

.. note::
Values for these two properties cannot be higher than the Radio Ramp-Up time defined by :c:macro:`TX_RAMP_UP_TIME` and :c:macro:`RX_RAMP_UP_TIME`.
Expand Down
1 change: 1 addition & 0 deletions doc/nrf/app_dev/device_guides/fem/fem_nrf21540_gpio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ To use nRF21540 in GPIO mode, complete the following steps:
* :kconfig:option:`CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB`
* :kconfig:option:`CONFIG_MPSL_FEM_NRF21540_RX_GAIN_DB`
* :kconfig:option:`CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL`
* :kconfig:option:`CONFIG_MPSL_FEM_NRF21540_PA_LEAD_TIME_ADDITIONAL_US`

#. Optionally replace the node name ``name_of_fem_node``.
#. Replace the pin numbers provided for each of the required properties:
Expand Down
12 changes: 12 additions & 0 deletions subsys/mpsl/fem/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,18 @@ config MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL

If this option is disabled the PA gain is constant and equal MPSL_FEM_NRF21540_TX_GAIN_DB.

config MPSL_FEM_NRF21540_PA_LEAD_TIME_ADDITIONAL_US
int "Additional lead time in microseconds by which the PA of the nRF21540 is enabled earlier."
default 15
help
Radio protocol drivers in the nRF Connect SDK usually set the target time point
when the PA of a Front-End Module is expected to be fully ramped-up and ready
for a transmission as the moment of the EVENTS_READY event of the RADIO peripheral.
However the RF power on the SoC output starts to rise before this event.
To avoid any spurious emission, at the moment when RF power starts to rise
on the SoC output the PA of the FEM should be fully ramped-up.
This parameter is added to the PA tx-en-settle-time-us device tree property
to enable the PA of the FEM earlier and avoid spurious emission.

endif # (MPSL_FEM_NRF21540_GPIO || MPSL_FEM_NRF21540_GPIO_SPI) && MPSL_FEM

Expand Down
3 changes: 2 additions & 1 deletion subsys/mpsl/fem/nrf21540_gpio/mpsl_fem_nrf21540_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ static int fem_nrf21540_gpio_configure(void)
.fem_config = {
.pa_time_gap_us =
DT_PROP(DT_NODELABEL(nrf_radio_fem),
tx_en_settle_time_us),
tx_en_settle_time_us) +
CONFIG_MPSL_FEM_NRF21540_PA_LEAD_TIME_ADDITIONAL_US,
.lna_time_gap_us =
DT_PROP(DT_NODELABEL(nrf_radio_fem),
rx_en_settle_time_us),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ static int fem_nrf21540_gpio_spi_configure(void)
.fem_config = {
.pa_time_gap_us =
DT_PROP(DT_NODELABEL(nrf_radio_fem),
tx_en_settle_time_us),
tx_en_settle_time_us) +
CONFIG_MPSL_FEM_NRF21540_PA_LEAD_TIME_ADDITIONAL_US,
.lna_time_gap_us =
DT_PROP(DT_NODELABEL(nrf_radio_fem),
rx_en_settle_time_us),
Expand Down