mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'docs/translate-phy' into 'master'
docs: Update CN translation for phy by adding or removing blank line and space Closes DOC-7834 See merge request espressif/esp-idf!30858
This commit is contained in:
commit
d7a2520493
@ -11,7 +11,9 @@ Principles and Components of Multiple Antennas
|
||||
|
||||
Multi-antenna functionality primarily involves routing signals from internal antenna modules to specific IO pins, controlling external antenna switches through IO pins to select designated antennas, supporting up to 16 antennas.
|
||||
|
||||
The components of multiple antennas can be depicted as following picture::
|
||||
The components of multiple antennas can be depicted as following picture:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
___________________________________________________________________________
|
||||
____|____ _________ |
|
||||
@ -28,17 +30,19 @@ The components of multiple antennas can be depicted as following picture::
|
||||
|
||||
{IDF_TARGET_NAME} Multiple antennas primarily consists of three parts: the PHY Antenna Module inside the chip, IO MUX and GPIO Matrix, and external antenna switches.
|
||||
|
||||
|
||||
1. PHY Antenna Module:
|
||||
- Both antenna modules support operation in transmit (TX) or receive (RX) mode, and can be configured via software to select a particular module for transmission or reception.
|
||||
- Each antenna module supports outputting up to 4 antenna selection signals antenna_select[3:0], which can be configured by software and mapped to any IO pin individually.
|
||||
- When an antenna module is in operation, the logic level of the IO pin corresponds to the configured signal value.
|
||||
|
||||
- Both antenna modules support operation in transmit (TX) or receive (RX) mode, and can be configured via software to select a particular module for transmission or reception.
|
||||
- Each antenna module supports outputting up to 4 antenna selection signals ``antenna_select[3:0]``, which can be configured by software and mapped to any IO pin individually.
|
||||
- When an antenna module is in operation, the logic level of the IO pin corresponds to the configured signal value.
|
||||
|
||||
2. IO MUX and GPIO Matrix:
|
||||
- Routes the internal 4-way antenna signals to specific IO pins.
|
||||
|
||||
- Routes the internal 4-way antenna signals to specific IO pins.
|
||||
|
||||
3. External Antenna Switches:
|
||||
- Typically multi-way selectors, they choose the working antenna based on the logic level of the ant_sel_in[x] pin. For example, ant_sel_in[3:0] as "0b1011" selects antenna 11.
|
||||
|
||||
- Typically multi-way selectors, they choose the working antenna based on the logic level of the ``ant_sel_in[x]`` pin. For example, ``ant_sel_in[3:0]`` as ``0b1011`` selects antenna 11.
|
||||
|
||||
Steps for Multi-Antenna Usage
|
||||
++++++++++++++++++++++++++++++
|
||||
@ -46,17 +50,20 @@ Steps for Multi-Antenna Usage
|
||||
1. Determine the IO pins used for controlling antenna switching based on hardware circuit design and external antenna switches.
|
||||
|
||||
2. Configure antenna selection signals to output to specified IO pins.
|
||||
- API :cpp:func:`esp_phy_set_ant_gpio()` is used to configure antenna_selects[3:0] signals to connect with GPIO[x3:x0]. If GPIO[x0] is connected to antenna_select[0], gpio_config->gpio_cfg[x0].gpio_select should be set to 1, and the value of gpio_config->gpio_cfg[x0].gpio_num should be GPIO[x0].
|
||||
|
||||
- API :cpp:func:`esp_phy_set_ant_gpio()` is used to configure ``antenna_selects[3:0]`` signals to connect with ``GPIO[x3:x0]``. If ``GPIO[x0]`` is connected to ``antenna_select[0]``, ``gpio_config->gpio_cfg[x0].gpio_select`` should be set to 1, and the value of ``gpio_config->gpio_cfg[x0].gpio_num`` should be ``GPIO[x0]``.
|
||||
|
||||
3. Configure internal antenna operation mode and output signals.
|
||||
- API :cpp:func:`esp_phy_set_ant()` is used to configure the use of internal antenna module 0 or 1 for transmission or reception, and to configure the output signal values when antenna module 0 or 1 is in operation.
|
||||
- ESP_PHY_ANT_MODE_AUTO mode is currently not recommended for use.
|
||||
|
||||
- API :cpp:func:`esp_phy_set_ant()` is used to configure the use of internal antenna module 0 or 1 for transmission or reception, and to configure the output signal values when antenna module 0 or 1 is in operation.
|
||||
- ``ESP_PHY_ANT_MODE_AUTO`` mode is currently not recommended for use.
|
||||
|
||||
Multi-Antenna Configuration Reference Example
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Typically, the following steps can be performed to configure multi-antenna:
|
||||
- Configure antenna_selects to connect with which GPIOs. For example, if four antennas are supported and GPIO20/GPIO21 are connected to antenna_select[0]/antenna_select[1], the configuration is as follows:
|
||||
|
||||
- Configure ``antenna_selects`` to connect with which GPIOs. For example, if four antennas are supported and GPIO20/GPIO21 are connected to ``antenna_select[0]/antenna_select[1]``, the configuration is as follows:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
@ -80,17 +87,18 @@ Typically, the following steps can be performed to configure multi-antenna:
|
||||
Notes
|
||||
++++++++++++++++++++++++++
|
||||
|
||||
1. Different antenna switches may have invalid input values for `ant_sel_in[3:0]`, meaning the number of antennas supported by {IDF_TARGET_NAME} via external antenna switches may be less than 16. For example, ESP32-WROOM-DA uses RTC6603SP as the antenna switch, supporting only 2 antennas. The two antenna selection input pins are active high and are connected to two GPIOs. '0b01' indicates antenna 0 is selected, '0b10' indicates antenna 1 is selected. Input values '0b00' and '0b11' are invalid.
|
||||
1. Different antenna switches may have invalid input values for ``ant_sel_in[3:0]``, meaning the number of antennas supported by {IDF_TARGET_NAME} via external antenna switches may be less than 16. For example, ESP32-WROOM-DA uses RTC6603SP as the antenna switch, supporting only 2 antennas. The two antenna selection input pins are active high and are connected to two GPIOs. ``0b01`` indicates antenna 0 is selected, ``0b10`` indicates antenna 1 is selected. Input values ``0b00`` and ``0b11`` are invalid.
|
||||
|
||||
2. Despite supporting up to 16 antennas, only a maximum of two antennas can be enabled simultaneously for sending and receiving data.
|
||||
|
||||
3. The use of ESP_PHY_ANT_MODE_AUTO mode is currently not recommended, primarily due to the following limitations:
|
||||
- For the antenna selection algorithm based on ESP_PHY_ANT_MODE_AUTO type for sending data, the antenna for sending data can only be set to ESP_PHY_ANT_MODE_AUTO when the antenna mode for receiving data is ESP_PHY_ANT_MODE_AUTO.
|
||||
- When the receiving or sending antenna mode is configured as ESP_PHY_ANT_MODE_AUTO, frequent antenna switching may occur if RF signal degradation is detected. Unstable RF signals can lead to frequent antenna switching, resulting in the overall RF performance not meeting expectations.
|
||||
3. The use of ``ESP_PHY_ANT_MODE_AUTO`` mode is currently not recommended, primarily due to the following limitations:
|
||||
|
||||
- For the antenna selection algorithm based on ``ESP_PHY_ANT_MODE_AUTO`` type for sending data, the antenna for sending data can only be set to ``ESP_PHY_ANT_MODE_AUTO`` when the antenna mode for receiving data is ``ESP_PHY_ANT_MODE_AUTO``.
|
||||
- When the receiving or sending antenna mode is configured as ``ESP_PHY_ANT_MODE_AUTO``, frequent antenna switching may occur if RF signal degradation is detected. Unstable RF signals can lead to frequent antenna switching, resulting in the overall RF performance not meeting expectations.
|
||||
|
||||
Recommended Scenarios for Using Multiple Antennas
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
1. Applications can either select specified antennas or implement their own antenna selection algorithms based on collected information, such as selecting antenna modes according to application-specific criteria. Refer to the IDF example :idf_file:`examples/phy/antenna/README.md` for designing antenna selection algorithms.
|
||||
|
||||
2. Configure antenna modes for both receiving and sending data as ESP_PHY_ANT_MODE_ANT0 or ESP_PHY_ANT_MODE_ANT1.
|
||||
2. Configure antenna modes for both receiving and sending data as ``ESP_PHY_ANT_MODE_ANT0`` or ``ESP_PHY_ANT_MODE_ANT1``.
|
||||
|
@ -11,7 +11,9 @@ PHY
|
||||
|
||||
多根天线功能主要通过将内部天线模块工作信号输出到具体 IO 引脚上,通过 IO 引脚控制外部天线切换器选择指定天线,最多支持 16 根天线。
|
||||
|
||||
下图描述多根天线功能组成::
|
||||
下图描述多根天线功能组成:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
___________________________________________________________________________
|
||||
____|____ _________ |
|
||||
@ -29,15 +31,18 @@ PHY
|
||||
{IDF_TARGET_NAME} 多根天线功能主要包含 3 个部分:芯片内部的 PHY 天线模块、IO MUX 和 GPIO Matrix、以及外部的天线切换器。
|
||||
|
||||
1.芯片内部的天线选择模块 PHY Antenna Module:
|
||||
- 两个天线模块均支持工作于发送 (TX) 或接收 (RX) 模式,可以通过软件配置发送和接收选用某个模块。
|
||||
- 每个天线模块最多支持输出 4 个天线选择信号 antenna_select[3:0],该信号值可由软件配置并且可以一一映射到任意 IO 引脚。
|
||||
- 当某个天线模块处于工作状态时,IO 引脚的高低电平值为软件配置的信号值。
|
||||
|
||||
- 两个天线模块均支持工作于发送 (TX) 或接收 (RX) 模式,可以通过软件配置发送和接收选用某个模块。
|
||||
- 每个天线模块最多支持输出 4 个天线选择信号 ``antenna_select[3:0]``,该信号值可由软件配置并且可以一一映射到任意 IO 引脚。
|
||||
- 当某个天线模块处于工作状态时,IO 引脚的高低电平值为软件配置的信号值。
|
||||
|
||||
2.IO MUX 和 GPIO Matrix:
|
||||
- 将内部 4 路天线信号输出到具体的 IO 引脚上。
|
||||
|
||||
- 将内部 4 路天线信号输出到具体的 IO 引脚上。
|
||||
|
||||
3.外部的天线切换器:
|
||||
- 一般为多路选择器,通过 ant_sel_in[x] 引脚的电平,选择工作的天线,例如 ant_sel_in[3:0] 为 "0b1011",表示选中天线 11。
|
||||
|
||||
- 一般为多路选择器,通过 ``ant_sel_in[x]`` 引脚的电平,选择工作的天线,例如 ``ant_sel_in[3:0]`` 为 ``0b1011``,表示选中天线 11。
|
||||
|
||||
多根天线使用步骤
|
||||
+++++++++++++++++++++++++++
|
||||
@ -45,18 +50,20 @@ PHY
|
||||
1.根据硬件电路设计及外部天线切换器确定用于控制天线切换的 IO 引脚。
|
||||
|
||||
2.配置天线选择信号输出到指定 IO 引脚
|
||||
- API :cpp:func:`esp_phy_set_ant_gpio()` 用于配置 antenna_selects[3:0] 信号连接 GPIO[x3:x0]。如果 GPIO[x0] 连接到 antenna_select[0],gpio_config->gpio_cfg[x0].gpio_select 应设置为 1,且 gpio_config->gpio_cfg[x0].gpio_num 的值为 GPIO[x0]。
|
||||
|
||||
- API :cpp:func:`esp_phy_set_ant_gpio()` 用于配置 ``antenna_selects[3:0]`` 信号连接 ``GPIO[x3:x0]``。如果 ``GPIO[x0]`` 连接到 ``antenna_select[0]``,``gpio_config->gpio_cfg[x0].gpio_select`` 应设置为 1,且 ``gpio_config->gpio_cfg[x0].gpio_num`` 的值为 ``GPIO[x0]``。
|
||||
|
||||
3.配置内部天线工作模式及输出信号
|
||||
- API :cpp:func:`esp_phy_set_ant()` 用于配置发送或接收时使用内部天线模块 0 或 1,并配置当天线模块 0 或 1 工作时的输出信号值。
|
||||
- 对于 ESP_PHY_ANT_MODE_AUTO 模式目前不推荐使用。
|
||||
|
||||
- API :cpp:func:`esp_phy_set_ant()` 用于配置发送或接收时使用内部天线模块 0 或 1,并配置当天线模块 0 或 1 工作时的输出信号值。
|
||||
- 对于 ``ESP_PHY_ANT_MODE_AUTO`` 模式目前不推荐使用。
|
||||
|
||||
多根天线配置参考例子
|
||||
++++++++++++++++++++++++++++
|
||||
|
||||
通常,可以执行以下步骤来配置多根天线:
|
||||
|
||||
- 配置 antenna_selects 连接哪些 GPIOs,例如,如果支持四根天线,且 GPIO20/GPIO21 连接到 antenna_select[0]/antenna_select[1],配置如下所示:
|
||||
- 配置 ``antenna_selects`` 连接哪些 GPIOs,例如,如果支持四根天线,且 GPIO20/GPIO21 连接到 ``antenna_select[0]/antenna_select[1]``,配置如下所示:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
@ -80,18 +87,18 @@ PHY
|
||||
注意事项
|
||||
++++++++++++++++++++++++++
|
||||
|
||||
1.不同天线切换器,`ant_sel_in[3:0]` 的输入值中可能存在非法值,即 {IDF_TARGET_NAME} 通过外部天线开关支持的天线数可能小于 16 根。例如,ESP32-WROOM-DA 使用 RTC6603SP 作为天线切换器,仅支持 2 根天线。两个天线选择输入管脚为高电平有效,连接到两个 GPIO。'0b01' 表示选中天线 0,'0b10' 表示选中天线 1。输入值 '0b00' 和 '0b11' 为非法值。
|
||||
1.不同天线切换器,``ant_sel_in[3:0]`` 的输入值中可能存在非法值,即 {IDF_TARGET_NAME} 通过外部天线开关支持的天线数可能小于 16 根。例如,ESP32-WROOM-DA 使用 RTC6603SP 作为天线切换器,仅支持 2 根天线。两个天线选择输入管脚为高电平有效,连接到两个 GPIO。``0b01`` 表示选中天线 0,``0b10`` 表示选中天线 1。输入值 ``0b00`` 和 ``0b11`` 为非法值。
|
||||
|
||||
2.尽管最多支持 16 根天线,发送和接收数据时,最多仅能同时使能两根天线。
|
||||
|
||||
3.对于 ESP_PHY_ANT_MODE_AUTO 模式目前不推荐使用,主要有以下限制情况需要考虑:
|
||||
- 因为发送数据天线基于 ESP_PHY_ANT_MODE_AUTO 类型的接收数据天线选择算法,只有接收数据的天线模式为 ESP_PHY_ANT_MODE_AUTO 时,发送数据天线才能设置为 ESP_PHY_ANT_MODE_AUTO。
|
||||
- 接收或者发送天线模式配置为 ESP_PHY_ANT_MODE_AUTO 时,只要存在 RF 信号的恶化,很容易触发天线切换。如果射频信号不稳定,天线会频繁切换,使得总的射频性能无法达到预期效果。
|
||||
3.对于 ``ESP_PHY_ANT_MODE_AUTO`` 模式目前不推荐使用,主要有以下限制情况需要考虑:
|
||||
|
||||
- 因为发送数据天线基于 ``ESP_PHY_ANT_MODE_AUTO`` 类型的接收数据天线选择算法,只有接收数据的天线模式为 ``ESP_PHY_ANT_MODE_AUTO`` 时,发送数据天线才能设置为 ``ESP_PHY_ANT_MODE_AUTO``。
|
||||
- 接收或者发送天线模式配置为 ``ESP_PHY_ANT_MODE_AUTO`` 时,只要存在 RF 信号的恶化,很容易触发天线切换。如果射频信号不稳定,天线会频繁切换,使得总的射频性能无法达到预期效果。
|
||||
|
||||
推荐在以下场景中使用多根天线
|
||||
++++++++++++++++++++++++++++
|
||||
|
||||
1.应用程序可以始终选择指定的天线,也可以执行自身天线选择算法,如根据应用程序收集的信息来选择天线模式等。请参考 IDF 示例 :idf_file:`examples/phy/antenna/README.md` 来设计天线选择算法。
|
||||
|
||||
2.接收/发送数据的天线模式均配置为 ESP_PHY_ANT_MODE_ANT0 或 ESP_PHY_ANT_MODE_ANT1。
|
||||
|
||||
2.接收/发送数据的天线模式均配置为 ``ESP_PHY_ANT_MODE_ANT0`` 或 ``ESP_PHY_ANT_MODE_ANT1``。
|
||||
|
Loading…
x
Reference in New Issue
Block a user