3

I wrote a small program on PlatformIO for an ESP32 with ESP-IDF framework.

Currently this is connected to my PC with USB cable. I receive lots of data from a CAN-BUS and I print this data with printf()

It seems the output with the standard baud rate 115200 is too slow. This is why I want to set this to a higher value.

I changed this in the platformio.ini without success.

monitor_speed = 115200

I searched and did not find where I can change this baud rate.

If possible my idea is to add some code, maybe just a line or two, to set the value i.e. to 230400

I mention the ESP32, PlatformIO and ESP-IDF because I am not sure where this setting is supposed to be.

caligari
  • 2,110
  • 20
  • 25
Edgar
  • 2,527
  • 2
  • 19
  • 40

3 Answers3

3

It is a setting of esp-idf framework. You can set the console baud rate in sdkconfig.defaults (at project root directory):

CONFIG_CONSOLE_UART_BAUDRATE=230400

You can also configure it via menuconfig (idf.py menuconfig or pio run -t menuconfig):

  • Component config
    • Common ESP-related
      • UART console baud rate
caligari
  • 2,110
  • 20
  • 25
  • On ESP32 S3 there is no such option, and if I change sdkconfig manually, it restored to 115200 after build. – iglk Apr 18 '23 at 08:14
  • This setting was renamed to __ESP_CONSOLE_UART_BAUDRATE__ in new versions of esp-idf framework. – caligari Apr 19 '23 at 09:15
  • I've succeeded to open baud rate option by selecting "Custom" / UART0 – iglk Apr 20 '23 at 10:07
0

If you are using VSC and ESP-IDF extension, go to settings (default CTRL+,) -> Extensions -> ESP-IDF -> Flash Baud Rate enter image description here

PiotrBzdrega
  • 38
  • 1
  • 7
0

On VSCode: Open Settings and search vor "baud". Don' t change "Flash Baud Rate", it is "Monitor Baud Rate" you want to adjust! Screenshot