Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/esp32: wrong XTAL frequency resulting in serial rubbish on ESP32 board with custom frequency #18828

Closed
jmgraeffe opened this issue Nov 1, 2022 · 0 comments · Fixed by #18829

Comments

@jmgraeffe
Copy link
Contributor

Description

Applications output rubbish through UART which seems to be the result of a mismatching XTAL frequency while building the bootloader. I've a board that has an XTAL frequency of 26 MHz but the bootloader is being built with 40 MHz configured fixed.

Steps to reproduce the issue

I built and flashed examples/hello-world to my ESP32 board using:

make flash term BOARD=esp32-wroom-32

Expected results

Serial output over UART:

2022-11-01 03:13:27,000 # ets Jul 29 2019 12:21:46
2022-11-01 03:13:27,000 # 
2022-11-01 03:13:27,005 # rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
2022-11-01 03:13:27,007 # configsip: 0, SPIWP:0xee
2022-11-01 03:13:27,013 # clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
2022-11-01 03:13:27,016 # mode:DOUT, clock div:2
2022-11-01 03:13:27,018 # load:0x3fff0030,len:1428
2022-11-01 03:13:27,020 # load:0x40078000,len:12788
2022-11-01 03:13:27,022 # load:0x40080400,len:2840
2022-11-01 03:13:27,024 # entry 0x40080410
2022-11-01 03:13:27,069 # Pro cpu up.
2022-11-01 03:13:27,070 # Single core mode
2022-11-01 03:13:27,125 # 
2022-11-01 03:13:27,132 # main(): This is RIOT! (Version: 2023.01-devel-219-g240cc)
2022-11-01 03:13:27,133 # Hello World!
2022-11-01 03:13:27,138 # You are running RIOT on a(n) esp32-wroom-32 board.
2022-11-01 03:13:27,141 # This board features a(n) esp32 MCU.

Actual results

Serial output over UART:

2022-11-01 03:09:39,720 # �#���l��l�n���N|$no�`lrn#$�
                                                     �n�lo|��$�
                                                               b�Nn���l$b�ܒ�oo�lld"���"`��noN�"�o� l�N�l"����o����l$��Nl#Nll�|�{�$b�|~�o���pb���o�����������{$co$l�|�s�ll �bets Jul 29 2019 12:21:46
2022-11-01 03:09:39,721 # 
2022-11-01 03:09:39,725 # rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
2022-11-01 03:09:39,727 # configsip: 0, SPIWP:0xee
2022-11-01 03:09:39,734 # clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
2022-11-01 03:09:39,736 # mode:DOUT, clock div:2
2022-11-01 03:09:39,738 # load:0x3fff0030,len:1428
2022-11-01 03:09:39,740 # load:0x40078000,len:12788

Versions

Operating System Environment
----------------------------
         Operating System: "Ubuntu" "20.04.4 LTS (Focal Fossa)"
                   Kernel: Linux 5.15.0-46-generic x86_64 x86_64
             System shell: /usr/bin/dash (probably dash)
             make's shell: /usr/bin/dash (probably dash)

Installed compiler toolchains
-----------------------------
               native gcc: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
        arm-none-eabi-gcc: missing
                  avr-gcc: avr-gcc (GCC) 5.4.0
           msp430-elf-gcc: missing
       riscv-none-elf-gcc: missing
  riscv64-unknown-elf-gcc: missing
     riscv-none-embed-gcc: missing
     xtensa-esp32-elf-gcc: missing
   xtensa-esp8266-elf-gcc: missing
                    clang: missing

Installed compiler libs
-----------------------
     arm-none-eabi-newlib: missing
        msp430-elf-newlib: missing
    riscv-none-elf-newlib: missing
riscv64-unknown-elf-newlib: missing
  riscv-none-embed-newlib: missing
  xtensa-esp32-elf-newlib: missing
xtensa-esp8266-elf-newlib: missing
                 avr-libc: "2.0.0" ("20150208")

Installed development tools
---------------------------
                   ccache: missing
                    cmake: cmake version 3.16.3
                 cppcheck: missing
                  doxygen: missing
                      git: git version 2.25.1
                     make: GNU Make 4.2.1
                  openocd: missing
                   python: Python 3.8.10
                  python2: Python 2.7.18
                  python3: Python 3.8.10
                   flake8: error: /usr/bin/python3: No module named flake8
               coccinelle: missing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant