mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix(esp_hw_support): fixed gpio sleep switching filling junk data to the console UART FIFO
This commit is contained in:
@@ -123,10 +123,7 @@ static esp_err_t uart_initialization(void)
|
||||
|
||||
static esp_err_t uart_wakeup_config(void)
|
||||
{
|
||||
/* UART will wakeup the chip up from light sleep if the edges that RX pin received has reached the threshold
|
||||
* Besides, the Rx pin need extra configuration to enable it can work during light sleep */
|
||||
ESP_RETURN_ON_ERROR(gpio_sleep_set_direction(EXAMPLE_UART_RX_IO_NUM, GPIO_MODE_INPUT), TAG, "Set uart sleep gpio failed");
|
||||
ESP_RETURN_ON_ERROR(gpio_sleep_set_pull_mode(EXAMPLE_UART_RX_IO_NUM, GPIO_PULLUP_ONLY), TAG, "Set uart sleep gpio failed");
|
||||
/* UART will wakeup the chip up from light sleep if the edges that RX pin received has reached the threshold */
|
||||
ESP_RETURN_ON_ERROR(uart_set_wakeup_threshold(EXAMPLE_UART_NUM, EXAMPLE_UART_WAKEUP_THRESHOLD),
|
||||
TAG, "Set uart wakeup threshold failed");
|
||||
/* Only uart0 and uart1 (if has) support to be configured as wakeup source */
|
||||
|
||||
Reference in New Issue
Block a user