mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
feat(uart): add glitch filter functionality for UART
Closes https://github.com/espressif/esp-idf/issues/17847
This commit is contained in:
@@ -107,6 +107,8 @@ For more information on how to configure the hardware flow control options, plea
|
||||
|
||||
Additionally, :cpp:member:`uart_config_t::allow_pd` can be set to enable the backup of the UART configuration registers before entering sleep and restore these registers after exiting sleep. This allows the UART to continue working properly after waking up even when the UART module power domain is entirely off during sleep. This option implies an balance between power consumption and memory usage. If the power consumption is not a concern, you can disable this option to save memory.
|
||||
|
||||
If glitches may occur on the RX signal, :cpp:member:`uart_config_t::rx_glitch_filt_thresh` can be set to filter the glitches to ensure the correct data is received (note that this feature is not supported on ESP32 and ESP32-S2). The unit of the :cpp:member:`uart_config_t::rx_glitch_filt_thresh` is nanoseconds. The default value is 0, which means no filtering.
|
||||
|
||||
Multiple Steps
|
||||
""""""""""""""
|
||||
|
||||
|
||||
@@ -107,6 +107,8 @@ UART 驱动程序函数通过 :cpp:type:`uart_port_t` 识别不同的 UART 控
|
||||
|
||||
此外,置位 :cpp:member:`uart_config_t::allow_pd` 会使能在进入睡眠模式前备份 UART 配置寄存器并在退出睡眠后恢复这些寄存器。这个功能使 UART 能够在系统唤醒后继续正常工作,即使其电源域在睡眠过程中被完全关闭。此选项需要用户在功耗和内存使用之间取得平衡。如果功耗不是一个问题,可以禁用这个选项来节省内存。
|
||||
|
||||
如果 RX 信号可能出现抖动,可以设置 :cpp:member:`uart_config_t::rx_glitch_filt_thresh` 来过滤抖动以确保接收到正确的数据(注意:该功能在 ESP32 和 ESP32-S2 上不支持)。:cpp:member:`uart_config_t::rx_glitch_filt_thresh` 的单位是纳秒。默认值为 0,即表示不进行过滤。
|
||||
|
||||
分步依次配置每个参数
|
||||
"""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user