I have an issue with my ESP32 DevKitC. When I connect to serial using the USB port two times, the baud rate suddenly reverts to 76923 from the previous 115200 (or any other rate set, for that matter).
This can be easily reproduced with this code:
Code: Select all
$ cat main.c
#include "esp_log.h"
#include "esp_event.h"
void app_main(void)
{
while (true) {
ESP_LOGI("FOO", "BAR");
vTaskDelay(300 / portTICK_PERIOD_MS);
}
}
Code: Select all
$ python -m serial.tools.miniterm /dev/ttyUSB0 115200
Code: Select all
$ python -m serial.tools.miniterm /dev/ttyUSB0 115200
--- Miniterm on /dev/ttyUSB0 115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
I (1220) FOO: BAR
I (1520) FOO: BAR
--- exit ---
Code: Select all
$ python -m serial.tools.miniterm /dev/ttyUSB0 115200
--- Miniterm on /dev/ttyUSB0 115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
��␃���ln�␀␌bp�l␌�␜�lb��ll␞␀�␒b�␎�␂ln␎l��␂��ln�␀␌bp�l�␜�lb��ll␞␀�␒b�␎�␂ln␎l��␂��ln�␀␌bp��␌�␌lb��ll␞␀�␒b�␎�␂$'␇$��␂��ln�␀␌bp���␌lb��ll␞␀�␒b�␎�␂ln␎l��␂���ln�␀␄#p����␜�$#��$$␟␀�␛#�␇�␃$'␇$��␂���ln�␀␄"p��$�␌$b��l,␞␀�␒b�␆�␂$&␆l��␂���ln�␀␄"p��Č␌,"��l,␞␀�␒#�␇�␂$&␆d��␂��ln�␀␌bp��l�␜�lb��ll␞␀�␒b�␎�␂ln␎l
--- exit ---
Code: Select all
$ python -m serial.tools.miniterm /dev/ttyUSB0 115200
--- Miniterm on /dev/ttyUSB0 115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
��␂��ln�␀␌bp���r�␌lb��ll␞␀�␒b�␎�␂ln␎l��␂���$'�␀␄#8����␄,"��l,␞␀�␒b�␇�␂$'␎l
--- Baudrate: ��␂��ln�␀␄"p��p�␌,b��l,␞␀�␒b�␇�␂l'␎l��␂���$'�␀␄#8�쎎␜�lb��ll␞␀�␒b�␎�␂ln␎l7��␂��ln�␀␌bp�쎎␜�lb��ll␞␀�␒b�␎�␂ln␎l69��␂��ln�␀␌bp�␌␌�␌lb��ll␞␀�␒b�␎�␂ln␎l��␂��ln�␀␌bp�␌�␌lb��ll␞␀�␒b�␎�␂ln␎l��␂��ln�␀␌bp�␌��␜�lb��ll␞␀�␒b�␎�␂ln␎l2��␂���$'�␀␄#8�␄$�␄$#��$$␟␀�␛#�␇�␃$'␇$3
--- Settings: /dev/ttyUSB0 76923,8,N,1
--- RTS: active DTR: active BREAK: inactive
--- CTS: inactive DSR: inactive RI: inactive CD: inactive
--- software flow control: inactive
--- hardware flow control: inactive
--- serial input encoding: UTF-8
--- serial output encoding: UTF-8
--- EOL: CRLF
--- filters: default
I (109220) FOO: BAR
I (109520) FOO: BAR
I (109820) FOO: BAR
I (110120) FOO: BAR
I (110420) FOO: BAR
--- exit ---
Best Regards