Open phildimond opened 4 years ago
Hello @phildimond,
Thank you for the issue.
Could you please provide more information:
I was trying to reproduce the issue with my ESP-WROOM32 board and the echo example from latest master and with release/v4.1. It works correctly with the UART_NUM_2 as well with UART_NUM_1 on my side and is able to return echo. I used the code you provided for initialization of UART as well as original code.
ESP 4.1
Code was the example as quoted. I was having trouble with my code so I went back to the example and had the same issue with it, until I swapped the order of the calls.
Devkit-C (new with V3 ESP-WROOM-32D)
Phillip Dimond Consulting Engineer, Gaming Systems Phone: 0409-748433 Intl: +61-409-748433
From: Alex Lisitsyn notifications@github.com Sent: Saturday, 7 November 2020 2:24 AM To: espressif/esp-idf esp-idf@noreply.github.com Cc: Phillip Dimond phil@adgaming.com.au; Mention mention@noreply.github.com Subject: Re: [espressif/esp-idf] Error in UART examples (IDFGH-3839) (#5746)
Hello @phildimondhttps://github.com/phildimond,
Thank you for the issue.
Could you please provide more information:
I was trying to reproduce the issue with my ESP-WROOM32 board and the echo example from latest master and with release/v4.1. It works correctly with the UART_NUM_2 as well with UART_NUM_1 on my side and is able to return echo. I used the code you provided for initialization of UART as well as original code.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/espressif/esp-idf/issues/5746#issuecomment-723138564, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA3SZ3FRUCMJVSDVRWTATF3SOQIJ3ANCNFSM4QCRDY6Q.
@phildimond,
Thank you for the information. Generally, order of the calling uart_param_config and uart_driver_install can be arbitrary. May be I am missing something but can not reproduce it on my Windows and Linux machine with the DevKitC ESP-WROOM-32D_V4 (what I have now) on release/v4.1. In order to fix this I need to confirm the issue and find reason for this. Could you send me your elf and binary file with the sdkconfig.
Thanks.
I'm seeing the same issue when using the pppos_client
example and using UART_NUM_2
not sure what the deal is there. UART is not behaving and i'm missing data etc. I'm on v4.2. Chip used for testing is ESP-WROOM-32U
. Using UART_NUM_1
works fine.
@phildimond,
Thank you for the information. Generally, order of the calling uart_param_config and uart_driver_install can be arbitrary.
Are you sure? Q1: What is the expected driver behavior before calling correct uart_param_config? Q2: What is the expected driver behavior before calling uart_set_pin?
IMHO, the init order does matter, e.g. 0784426d6b6a0d1e97a7594493b2c80e82070404
@phildimond,
Thank you for the information. Generally, order of the calling uart_param_config and uart_driver_install can be arbitrary.
https://github.com/espressif/esp-idf/issues/6589 show the order does matter.
The UART example code for ESP32 has an error. The driver install must come after the configuration.
For example in the esp-idf/examples/peripherals/uart/uart_echo/ example, the code below in uart_echo_example_main.c will not work if the UART is changed to UART_NUM_2 unless the uart_driver_install is moved after the uart_set_pin.