Page 1 of 1

gibberish text in terminal

Posted: Sat Sep 09, 2017 8:41 am
by mhm_nab
Hi,
I followed the official tutorial to start with the ESP32. Everything is working except the "printf" function. I have an ESP32 from Sparkfun, and any printf results in gibberish text in terminal. I tried changing the baud rate to different values, whether through "make menuconfig", or in the terminal by using the command "stty", but nothing changed. My laptop is a Mac. I also tried to connect using (screen ... <baud_rate>) but no success.
I have a another board (no Sparkfun), and it works fine. So, my configurations seem to be fine.

Any ideas?

Please let me know if you require any debugging info.

Re: gibberish text in terminal

Posted: Sun Sep 10, 2017 6:28 am
by ESP_Sprite
Check 'make menuconfig', under components -> esp32 -> Main XTAL Frequency. The Sparkfun thing uses a 26MHz crystal, so select that instead of the 40MHz one.

Re: gibberish text in terminal

Posted: Sun Sep 10, 2017 7:07 am
by mhm_nab
ESP_Sprite wrote:Check 'make menuconfig', under components -> esp32 -> Main XTAL Frequency. The Sparkfun thing uses a 26MHz crystal, so select that instead of the 40MHz one.
You solved it!

I have spent hours on this, thinking it has to do with the baud rate or with the drivers... I tested on 2 laptops, Mac & Win... Read all doc (Sparkfun and others). I am not sure how I was supposed to know about that difference.

Thanks a lot

Re: gibberish text in terminal

Posted: Mon Sep 11, 2017 3:07 am
by ESP_Sprite
I can imagine that's a pitfall... we used to have 'autodetect' as a standard, but changed this to 40MHz because 'autodetect' seems to sometimes not work. If that happens in production, you have an unusable ESP32, hence the switch. Unfortunately, because this change is pretty new, there aren't too many mentions of it yet.