Re: Cant wake up from UART_NUM_1
Posted: Sat Feb 29, 2020 2:25 am
I think you will always lose the first packet when waking up, even when using gpio3. The uart fifo is not available in sleep to save the bytes.
Hey there, I know the thread is some months old, but I have the same problem. Can you please give us a hint on how to set mux for gpio 9 to uart1 rx? For UART0 everything works fine, also the wake up, but for UART1 it does not work:Did you set the mux for gpio9 to uart1 rx
Code: Select all
//gpio_iomux_in(GPIO_NUM_9, U1RXD_IN_IDX);
//gpio_iomux_out(GPIO_NUM_9, 5, false);
uart_set_wakeup_threshold(1, 3);
esp_sleep_enable_uart_wakeup(1);
Would anybody be so kind to help? I tried pretty much everything to wake up on UART_NUM_1. Wake up by gpio_wakeup_enable works fine. That is my code:Hey there, I know the thread is some months old, but I have the same problem. Can you please give us a hint on how to set mux for gpio 9 to uart1 rx? For UART0 everything works fine, also the wake up, but for UART1 it does not work:Did you set the mux for gpio9 to uart1 rx
Also doesn't work with the gpio_iomux_in and out functions.Code: Select all
//gpio_iomux_in(GPIO_NUM_9, U1RXD_IN_IDX); //gpio_iomux_out(GPIO_NUM_9, 5, false); uart_set_wakeup_threshold(1, 3); esp_sleep_enable_uart_wakeup(1);
Code: Select all
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA2_U, FUNC_SD_DATA2_U1RXD); // GPIO9 should be configured as function_5
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA3_U, FUNC_SD_DATA3_U1TXD);
if(uart_set_wakeup_threshold(1, 3) != ESP_OK) { printf("ERROR10\n"); }
if(esp_sleep_enable_uart_wakeup(1) != ESP_OK) { printf("ERROR11\n"); }
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON); // +1uA, internal pull-ups and pull-downs and ULP
esp_light_sleep_start();