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: softdevice_controller/doc/channel_sounding.rst
+115-5Lines changed: 115 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,8 @@ The following LE CS commands are supported:
37
37
* LE CS Test
38
38
* LE CS Test End
39
39
40
+
.. _cs_supported_capabilities:
41
+
40
42
Supported capabilities
41
43
----------------------
42
44
@@ -60,13 +62,43 @@ The supported timing values for the |controller| are as follows:
60
62
* A T_PM of 10 µs or greater.
61
63
* A T_SW of 10 µs.
62
64
65
+
.. note::
66
+
The T_SW time reported is based on the implementation of antenna switching in the |NCS|, as described in :ref:`cs_multiple_antenna_support`.
67
+
If users implement their own switching functions, they must ensure that the new implementation meets the timing requirements reported in :ref:`cs_supported_capabilities`.
68
+
69
+
.. _cs_multiple_antenna_support:
70
+
63
71
Multiple antennas support
64
72
-------------------------
65
73
66
-
Currently, the |controller| supports multiple antennas with a fixed pinout for the multi-antenna switch.
67
-
In order to use the |controller| with multiple antennas, an external GPIO controlled multi-antenna switch needs to be set up with the following truth table:
74
+
Users may define their own antenna switching behavior in the |NCS|.
75
+
By using the :c:func:`cs_antenna_switch_func` function and devicetree, users can register GPIO-controlled antenna switches with the |controller|.
76
+
The Channel Sounding implementation will then automatically use the registered pins to control an external antenna switch for multi-antenna designs.
77
+
The pins assigned to a multi-antenna design will be reserved by the |controller| and cannot be used by other activity.
78
+
If users do not want to use the implementation provided in the |NCS|, they must register their own callback function for antenna switching in :c:func:`sdc_support_channel_sounding`.
79
+
80
+
.. note::
81
+
The |controller| requires an :c:type:`sdc_cs_antenna_switch_callback_t` antenna switching callback to :c:func:`sdc_support_channel_sounding` whenever it is configured with support for multiple antennas.
82
+
This is done automatically in the |NCS|.
83
+
84
+
When using :c:func:`cs_antenna_switch_func`, users can register which pins control the antenna switch, as well as how the pins switch, using devicetree.
85
+
An example declaration of an antenna switch in devicetree is as follows:
86
+
87
+
.. code-block:: devicetree
68
88
69
-
.. list-table:: Antenna control for multi-antenna switching.
89
+
cs_antenna_switch: cs-antenna-config {
90
+
status = "okay";
91
+
compatible = "nordic,bt-cs-antenna-switch";
92
+
ant-gpios = <&gpio1 11 (GPIO_ACTIVE_HIGH)>,
93
+
<&gpio1 12 (GPIO_ACTIVE_HIGH)>,
94
+
<&gpio1 13 (GPIO_ACTIVE_HIGH)>,
95
+
<&gpio1 14 (GPIO_ACTIVE_HIGH)>;
96
+
multiplexing-mode = <0>;
97
+
};
98
+
99
+
This setup corresponds to the following truth table:
100
+
101
+
.. list-table:: Antenna control for multi-antenna switching without multiplexing mode.
70
102
:widths: 30 5 5 5 5
71
103
:header-rows: 1
72
104
@@ -96,9 +128,87 @@ In order to use the |controller| with multiple antennas, an external GPIO contro
96
128
- 0
97
129
- 1
98
130
131
+
An alternative to the provided setup is to use multiplexing mode.
132
+
This method allows fewer pins to control multiple antennas simultaneously:
133
+
134
+
.. list-table:: Antenna control for multi-antenna switching using multiplexing mode.
135
+
:widths: 30 5 5
136
+
:header-rows: 1
137
+
138
+
* - Active Antenna:
139
+
- **P1.11**
140
+
- **P1.12**
141
+
* - Antenna 1
142
+
- 0
143
+
- 0
144
+
* - Antenna 2
145
+
- 0
146
+
- 1
147
+
* - Antenna 3
148
+
- 1
149
+
- 0
150
+
* - Antenna 4
151
+
- 1
152
+
- 1
153
+
154
+
Multiplexing mode can be configured with devicetree as follows:
155
+
156
+
.. code-block:: devicetree
157
+
158
+
cs_antenna_switch: cs-antenna-config {
159
+
status = "okay";
160
+
compatible = "nordic,bt-cs-antenna-switch";
161
+
ant-gpios = <&gpio1 11 (GPIO_ACTIVE_HIGH)>,
162
+
<&gpio1 12 (GPIO_ACTIVE_HIGH)>;
163
+
multiplexing-mode = <1>;
164
+
};
165
+
166
+
If a design does not use four antennas, users can register fewer pins to achieve the desired behavior:
167
+
168
+
.. code-block:: devicetree
169
+
170
+
cs_antenna_switch: cs-antenna-config {
171
+
status = "okay";
172
+
compatible = "nordic,bt-cs-antenna-switch";
173
+
ant-gpios = <&gpio1 11 (GPIO_ACTIVE_LOW)>,
174
+
<&gpio1 12 (GPIO_ACTIVE_LOW)>,
175
+
<&gpio1 13 (GPIO_ACTIVE_LOW)>;
176
+
multiplexing-mode = <0>;
177
+
};
178
+
179
+
.. list-table:: Antenna control for multi-antenna switching with only 3 antennas.
180
+
:widths: 30 5 5 5
181
+
:header-rows: 1
182
+
183
+
* - Active Antenna:
184
+
- **P1.11**
185
+
- **P1.12**
186
+
- **P1.13**
187
+
* - Antenna 1
188
+
- 0
189
+
- 1
190
+
- 1
191
+
* - Antenna 2
192
+
- 1
193
+
- 0
194
+
- 1
195
+
* - Antenna 3
196
+
- 1
197
+
- 1
198
+
- 0
199
+
200
+
201
+
Adding a custom antenna switch IC
202
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
203
+
204
+
When using the provided :c:func:`cs_antenna_switch_func` implementation in the |NCS|, the |controller| uses a maximum of 4 µs to set a GPIO pin high.
205
+
Therefore, a multi-antenna switch using this solution must switch within 6 µs to maintain the 10 µs T_SW reported in :ref:`cs_supported_capabilities`.
206
+
207
+
In addition to switching fast enough to meet switch timings, any RF switch used for antenna switching in Channel Sounding must handle switching while the radio is active.
208
+
This is because the switch time is too short to power-cycle the radio between tones.
209
+
99
210
.. note::
100
-
Currently, the |controller| needs a maximum of 4 µs to trigger an antenna switch within the T_SW period.
101
-
This means that any multi-antenna switch with the correct pinout must switch within 6 µs to maintain 10 µs T_SW.
211
+
When registering multiple antennas with the |controller|, the first antenna in the antenna array will be used by default for |BLE| transmission.
0 commit comments