[SOLVED]esp_sleep_enable_uart_wakeup with CONFIG_CONSOLE_UART_CUSTOM configuration

davdav
Posts: 206
Joined: Thu Nov 17, 2016 2:33 pm

Re: esp_sleep_enable_uart_wakeup with CONFIG_CONSOLE_UART_CUSTOM configuration

Postby davdav » Sat Jul 27, 2019 11:58 am

WiFive wrote:
Sat Jul 27, 2019 1:27 am
I have tested a simple example and it does work as long as you use the function calls I posted.
Thanks for testing @WiFive. This means my code could have problems.

May I ask you to provide the source code of your test example (and sdkconfig file if possible)? Did you setup the CONFIG_CONSOLE_UART_COSTUM like I originally posted?

I forgot to mention I'm on esp-idf v3.2.2 but I didn't tested on master branch.

Thanks again and regards

WiFive
Posts: 3073
Joined: Tue Dec 01, 2015 7:35 am

Re: esp_sleep_enable_uart_wakeup with CONFIG_CONSOLE_UART_CUSTOM configuration

Postby WiFive » Sat Jul 27, 2019 7:32 pm

modified uart example attached

Code: Select all

# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set
CONFIG_ESP_CONSOLE_UART_CUSTOM=y
# CONFIG_ESP_CONSOLE_UART_NONE is not set
# CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0 is not set
CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1=y
CONFIG_ESP_CONSOLE_UART_NUM=1
CONFIG_ESP_CONSOLE_UART_TX_GPIO=19
CONFIG_ESP_CONSOLE_UART_RX_GPIO=5
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
Attachments
uart_events_example_main.c
(7.26 KiB) Downloaded 281 times

davdav
Posts: 206
Joined: Thu Nov 17, 2016 2:33 pm

Re: esp_sleep_enable_uart_wakeup with CONFIG_CONSOLE_UART_CUSTOM configuration

Postby davdav » Sun Jul 28, 2019 9:31 am

WiFive wrote:
Sat Jul 27, 2019 7:32 pm
modified uart example attached

Code: Select all

# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set
CONFIG_ESP_CONSOLE_UART_CUSTOM=y
# CONFIG_ESP_CONSOLE_UART_NONE is not set
# CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0 is not set
CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1=y
CONFIG_ESP_CONSOLE_UART_NUM=1
CONFIG_ESP_CONSOLE_UART_TX_GPIO=19
CONFIG_ESP_CONSOLE_UART_RX_GPIO=5
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
Thanks a lot @WiFive,

I will test on my side your example, modifying only the UART_RX_GPIO and UART_TX_GPIO config to reflect our pcb (gpio25 and gpio27) for uart1.

I wish to understand where/what is the wrong part of my code.

Regards

davdav
Posts: 206
Joined: Thu Nov 17, 2016 2:33 pm

Re: esp_sleep_enable_uart_wakeup with CONFIG_CONSOLE_UART_CUSTOM configuration

Postby davdav » Mon Jul 29, 2019 9:55 am

WiFive wrote:
Sat Jul 27, 2019 7:32 pm
modified uart example attached

Code: Select all

# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set
CONFIG_ESP_CONSOLE_UART_CUSTOM=y
# CONFIG_ESP_CONSOLE_UART_NONE is not set
# CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0 is not set
CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1=y
CONFIG_ESP_CONSOLE_UART_NUM=1
CONFIG_ESP_CONSOLE_UART_TX_GPIO=19
CONFIG_ESP_CONSOLE_UART_RX_GPIO=5
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
Hello @WiFive,

I have tested your example and I was able to get it work also in our project. I will add SOLVED to topic.

Thanks for support.

Who is online

Users browsing this forum: No registered users and 43 guests