You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mpsl/doc/fem.rst
+43-41Lines changed: 43 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,31 +32,30 @@ Simple GPIO
32
32
All currently supported implementations use the PA and LNA pins for controlling the FEM.
33
33
Additionally, the nRF21540 implementations use the PDN pin for powering down the FEM internal circuits, to reduce energy consumption.
34
34
35
-
Tx power split
35
+
TX power split
36
36
**************
37
37
38
38
When an application requests a given transmission power, it wants to achieve that power at the antenna.
39
39
Usually, the application does not know all hardware components, such as RF front-end modules, on the radio signal path.
40
40
To achieve a specific value of transmission power at the antenna, every FEM implementation provides a dedicated API that calculates the PA gain and SoC output power combination that results in the requested power at the antenna.
41
-
It also calculates a private setting value that is applied to the FEM which is needed to achieve the calculated PA gain.
41
+
It also calculates a private setting value applied to the FEM that is needed to achieve the calculated PA gain.
42
42
The meaning of this private setting is specific to each FEM implementation.
43
43
44
44
FEM implementations with multiple PA gains available (for example, nRF21540 with MODE pin support) choose which gain to use based on hardware limitations and the requested power value.
45
45
Alternatively, an external model can be used to determine the gain.
46
46
47
-
Tx power split using models
47
+
TX power split using models
48
48
===========================
49
49
50
-
The Tx power split can be done using a model.
51
-
This can be done to allow, for example, compensation of external conditions.
52
-
The model can be an external model passed to MPSL or a built-in model.
50
+
You can achieve the TX power split using a model, to compensate, for example, for external conditions.
51
+
The model can be either external (passed to MPSL) or built-in.
53
52
54
-
A built-in model is currently provided only for the nRF21540 GPIO SPI FEM implementation and it is in an experimental stage.
53
+
A built-in model is currently provided only for the nRF21540 GPIO SPI FEM implementation and it is in an :ref:`experimental<nrf:software_maturity>` stage.
55
54
The provided model allows for temperature, voltage, and frequency compensation.
56
55
57
-
The model is passed to MPSL before FEM configuration, and contains two callbacks: ``fetch`` and ``init``.
58
-
After it has finished configuration, MPSL calls ``init`` to pass all the calibration and configuration data required by the specific FEM implementation to the model and to initialize the model.
59
-
Each time a Tx power split is needed, MPSL calls the ``fetch`` function and passes the frequency and the requested output power to the model.
56
+
The model is passed to MPSL before the FEM configuration, and contains two callbacks: ``fetch`` and ``init``.
57
+
After it completes the configuration, MPSL calls ``init`` to pass all the calibration and configuration data required by the specific FEM implementation to the model and to initialize the model.
58
+
Each time a TX power split is needed, MPSL calls the ``fetch`` function and passes the frequency and the requested output power to the model.
60
59
The model then decides how to split this power into components, and calculates both the private setting for the specific FEM implementation and the actually achieved output power.
61
60
62
61
Configurable timings
@@ -75,20 +74,20 @@ For the nRF21540, two additional timings can also be configured:
75
74
General usage
76
75
*************
77
76
78
-
The Power Amplifier and the Low-Noise Amplifier are responsible for, respectively, transmission and reception and are configured and activated independently.
77
+
The Power Amplifier and the Low-Noise Amplifier are responsible for, respectively, transmission and reception, and are configured and activated independently.
79
78
The two functionalities cannot be configured and set to operate simultaneously, because they share some resources.
80
79
As such, after operating with a Power Amplifier, the PA configuration must be cleared to be able to configure and use a Low-Noise Amplifier afterward, and vice versa.
81
80
82
81
Both amplifiers are controlled through activation and deactivation events.
83
82
Two types of events are supported:
84
83
85
84
* A *timer event*.
86
-
It is the ``COMPARE`` event of a hardware timer and it can be used for both PA/LNA activation and deactivation.
85
+
It is the ``COMPARE`` event of a hardware timer and it can be used for both PA and LNA activation and deactivation.
87
86
* A *generic event*.
88
-
It is any other event type and it can only be used for PA/LNA deactivation.
87
+
It is any other event type and it can only be used for PA and LNA deactivation.
89
88
90
-
To prepare a generic event, it is required that the application provides the event register.
91
-
To prepare a timer event, it is required that the application provides the following:
89
+
To prepare a generic event, the application must provide the event register.
90
+
To prepare a timer event, the application must provide the following:
92
91
93
92
* The instance of the timer, which the protocol has to start by itself.
94
93
* The *Compare Channels* mask, which tells the front-end module which Compare Channels of the provided Timer are free to use.
@@ -97,7 +96,7 @@ To prepare a timer event, it is required that the application provides the follo
97
96
98
97
Then, the module can configure the timer to activate or deactivate the FEM accordingly, taking also into account the FEM settle time.
99
98
100
-
See below for an example of activating the LNA for Rx operation, using the following parameters:
99
+
The following example activates the LNA for an RX operation, using the following parameters:
101
100
102
101
* RX ramp-up time - 40 us
103
102
* LNA settle time - 13 us
@@ -106,20 +105,20 @@ See below for an example of activating the LNA for Rx operation, using the follo
106
105
107
106
The *RX ramp-up time* is the total time scheduled by the application.
108
107
109
-
See below for the steps needed to properly configure LNA in this example:
108
+
The steps needed to properly configure LNA in this example are the following:
110
109
111
-
1 The application configures the LNA to be activated by the timer event, with the start time set to 0 us and the end time set to 40 us.
112
-
# The application provides the ``rx_end`` event as the LNA deactivation event.
113
-
# The FEM module reads the scheduled time and sets the ``TIMER0`` compare channel to 27 us, as a result of the RX ramp-up time (40 us) minus the LNA settle time (13 us).
114
-
# The application starts the RX operation.
115
-
# The application starts ``TIMER0``.
110
+
1. The application configures the LNA to be activated by the timer event, with the start time set to 0 us and the end time set to 40 us.
111
+
#. The application provides the ``rx_end`` event as the LNA deactivation event.
112
+
#. The FEM module reads the scheduled time and sets the ``TIMER0`` compare channel to 27 us, as a result of the RX ramp-up time (40 us) minus the LNA settle time (13 us).
113
+
#. The application starts the RX operation.
114
+
#. The application starts ``TIMER0``.
116
115
117
116
The following picture illustrates the timings in this scenario:
118
117
119
118
.. figure:: pic/FEM_timing_simple.svg
120
119
:alt:Timing of LNA pin for reception
121
120
122
-
Timing of LNA pin for reception
121
+
Timing of the LNA pin for reception
123
122
124
123
The following picture illustrates the calls between the application, the FEM module, and the hardware in this scenario:
125
124
@@ -135,7 +134,7 @@ In the nRF21540 implementation, the PDN pin is used to power down the FEM intern
135
134
The FEM can be powered down on an explicit application request.
136
135
The FEM is powered back up automatically before PA or LNA are activated.
137
136
138
-
See below for an example of controlling LNA and PDN during Rx operation, using the following parameters:
137
+
The following example controls LNA and PDN during an RX operation, using the following parameters:
139
138
140
139
* RX ramp-up time - 40 us
141
140
* LNA settle time - 13 us
@@ -146,23 +145,23 @@ See below for an example of controlling LNA and PDN during Rx operation, using t
146
145
147
146
The *RX ramp-up time* is the total time scheduled by the application.
148
147
149
-
See below for the steps needed to properly configure LNA and PDN in this example:
148
+
The steps needed to properly configure LNA and PDN in this example are the following:
150
149
151
-
* The application configures the power-down passing ``rx_end`` as the activation event.
152
-
* The application configures LNA to be activated by the timer event, with the start time set to 0 us and the end time set to 40 us.
153
-
* The application provides the ``rx_end`` event as the LNA deactivation event.
154
-
* The FEM module reads the scheduled time and sets ``TIMER1`` compare channels to 27 us (40-13) and 9 us (27-18).
155
-
* The application starts Rx operation.
156
-
* The application starts ``TIMER1``.
150
+
1. The application configures the power-down passing ``rx_end`` as the activation event.
151
+
#. The application configures LNA to be activated by the timer event, with the start time set to 0 us and the end time set to 40 us.
152
+
#. The application provides the ``rx_end`` event as the LNA deactivation event.
153
+
#. The FEM module reads the scheduled time and sets ``TIMER1`` compare channels to 27 us (40-13) and 9 us (27-18).
154
+
#. The application starts the RX operation.
155
+
#. The application starts ``TIMER1``.
157
156
158
157
The following picture illustrates the timing in this scenario:
159
158
160
159
.. figure:: pic/FEM_timing_nRF21540.svg
161
-
:alt:Timing of LNA and PDN pins for reception
160
+
:alt:Timing of the LNA and PDN pins for reception
162
161
163
-
Timing of LNA and PDN pins for reception
162
+
Timing of the LNA and PDN pins for reception
164
163
165
-
The following picture presents the calls between the application, the FEM module, and the hardware in this scenario:
164
+
The following picture illustrates the calls between the application, the FEM module, and the hardware in this scenario:
166
165
167
166
.. figure:: pic/FEM_sequence_nRF21540.svg
168
167
:alt:Sequence diagram of LNA and PDN control for reception
@@ -172,19 +171,22 @@ The following picture presents the calls between the application, the FEM module
172
171
PA gain control
173
172
===============
174
173
174
+
FEM implementations with multiple PA gains available can choose which gain to use.
175
+
175
176
PA switched gain
176
177
----------------
177
178
178
-
Optionally, both nRF21540 implementations can control the FEM to select one of two available PA gains without the need to provide any model.
179
-
To do so, the nRF21540 GPIO implementation uses MODE pin switching, while the nRF21540 GPIO SPI implementation performs appropriate SPI transfers.
179
+
Both nRF21540 implementations can control the FEM to select one of two available PA gains without the need to provide any model.
180
+
To do so, the nRF21540 GPIO implementation uses MODE pin switching, while the nRF21540 GPIO SPI implementation performs the appropriate SPI transfers.
180
181
181
182
To enable this feature for the nRF21540 GPIO implementation, the MODE pin must be enabled in the interface configuration that the application passes on initialization.
182
-
For the nRF21540 GPIO SPI implementation, runtime gain control must be enabled in the interface configuration that the application passes on initialization.
183
+
To enable this feature for the nRF21540 GPIO SPI implementation, runtime gain control must be enabled in the interface configuration that the application passes on initialization.
183
184
184
185
PA Gain control using a built-in compensation model
The nRF21540 GPIO SPI implementation can be used with a built-in model.
188
-
Using this model allows for compensation of external conditions like temperature, supply voltage and frequency.
189
-
The model is currently in an experimental stage.
190
-
To use this model, the structure containing the model callbacks needs to be acquired from MPSL by its getter function and then passed to MPSL just like all other models.
188
+
The nRF21540 GPIO SPI implementation can be used with the built-in model.
189
+
Using this model allows for the compensation of external conditions like temperature, supply voltage and frequency.
190
+
191
+
The model is currently in an :ref:`experimental <nrf:software_maturity>` stage.
192
+
To use this model, MPSL's getter function must acquire the structure containing the model callbacks and then must pass it to MPSL just like all the other models.
0 commit comments