Cant wake up from UART_NUM_1
Re: Cant wake up from UART_NUM_1
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.
Re: Cant wake up from UART_NUM_1
I was losing a lot of bytes, not only the first one. I suspect the reason was that the chip would wake up and then immediately sleep, and after a bunch of things I have to sort now (involving locking sleep on the interrupt), it is working. But I'm not sure how I should do this correctly.
Re: Cant wake up from UART_NUM_1
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:
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);
Re: Cant wake up from UART_NUM_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:timmbo wrote: ↑Mon Nov 30, 2020 6:27 pmHey 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:
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();
Who is online
Users browsing this forum: Majestic-12 [Bot] and 93 guests