PlatformIO Community

Serial Monitor Problem

Hi all,

I have a problem with serial monitor. After creating an ESP32 project with Arduino Framework, serial monitor works perfect. But when I try to use ESP-IDF Framework, data seen in the serial monitor is junk. I added the screenshot. What could be the problem? Thanks in advance!

This is my platformio.ini

[env:ttgo-lora32-v1]
platform = espressif32
board = ttgo-lora32-v1
framework = espidf
monitor_speed = 115200

Screenshot from 2022-05-11 20-17-30

What are the 148 lines above your app_main function? What mods did you do to the sdkconfig? Does platform-espressif32/examples/espidf-hello-world at develop · platformio/platform-espressif32 · GitHub behave the same?

Hi, it is the example code. You can see it here.

I will check your example asap.

Using examples from the master branch of the esp-idf repo is wrong when PlatformIO uses ESP-IDF v.4.3.2. Does this version fare better?

Hi @maxgerhardt,

I tried both but the results are same. Here is the screenshot of HelloWorld example;

Screenshot from 2022-05-12 09-05-27

Same behavior when you set board = esp32dev?

Yes, nothing changed.

Open a CLI and execute

pio upgrade --dev
pio platform update espressif32

Did anything change after rebuild + reupload?

pio upgraded but espressif32 platform already up-to-date. Still the same. If you want I can share my project files.

Hi,
I solved the problem. It was because of XTAL frequency set default 40MHz. After changing it to Auto Detect, it fixed. But I do not know why it worked on Arduino framework and did not work with esp-idf.
Thanks!

1 Like