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

esp32: gnrc_networking crashing #18083

Closed
haukepetersen opened this issue May 10, 2022 · 1 comment
Closed

esp32: gnrc_networking crashing #18083

haukepetersen opened this issue May 10, 2022 · 1 comment
Labels
Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@haukepetersen
Copy link
Contributor

Description

Currently, I am no able to get gnrc_networking working on an esp32. When I flash gnrc_networking on a esp32-wroom-32, the serial port is constantly disconnecting. This happens independent of the Wifi configuration.

/home/hauke/dev/riot/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyUSB0" -b "115200"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2022-05-10 12:02:39,293 # Connect to serial port /dev/ttyUSB0
Welcome to pyterm!
Type '/exit' to exit.
2022-05-10 12:02:40,326 # Initializing. RAM available for dynamic allocation:
2022-05-10 12:02:40,326 # At 3FFAE6E0 len 00001920 (6 KiB): DRAM
2022-05-10 12:02:40,327 # At 3FFBC580 len 00023A80 (142 KiB): DRAM
2022-05-10 12:02:40,327 # At 3FFE0440 len 0001FBC0 (126 KiB): D/IRAM
2022-05-10 12:02:40,328 # At 40078000 len 00008000 (32 KiB): IRAM
2022-05-10 12:02:40,328 # At 4008E630 len 000119D0 (70 KiB): IRAM
2022-05-10 12:02:40,686 # 32 kHz XTAL not found, switching to internal 150 kHz oscillator
2022-05-10 12:02:40,737 # 
2022-05-10 12:02:42,492 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:43,493 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:44,495 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:45,496 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:46,497 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:47,498 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:48,499 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:49,501 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:50,502 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:51,503 # Try to reconnect to /dev/ttyUSB0 again...                       # <- here i pressed the reset button
2022-05-10 12:02:51,538 # Reconnected to serial port /dev/ttyUSB0
2022-05-10 12:02:52,527 # 32 kHz XTAL not found, switching to internal 150 kHz oscillator
2022-05-10 12:02:52,578 # 
2022-05-10 12:02:54,332 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:55,333 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:56,334 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:57,335 # Serial port disconnected, waiting to get reconnected...
2022-05-10 12:02:58,336 # Serial port disconnected, waiting to get reconnected...

Pyterm is constantly reconnecting to the serial port roughly once a second, looks a little bit like the esp32 is stuck in a reboot loop of some kind?! Could this be something watchdog related?

Flashing hello-world on the same board works just as expected:

2022-05-10 11:56:39,246 # 
2022-05-10 11:56:39,251 # rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
2022-05-10 11:56:39,253 # configsip: 0, SPIWP:0xee
2022-05-10 11:56:39,260 # clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
2022-05-10 11:56:39,262 # mode:DOUT, clock div:2
2022-05-10 11:56:39,264 # load:0x3fff0030,len:1452
2022-05-10 11:56:39,266 # ho 0 tail 12 room 4
2022-05-10 11:56:39,268 # load:0x40078000,len:11460
2022-05-10 11:56:39,271 # load:0x40080400,len:2780
2022-05-10 11:56:39,272 # entry 0x400805ac
2022-05-10 11:56:40,595 # 32 kHz XTAL not found, switching to internal 150 kHz oscillator
2022-05-10 11:56:40,645 # 
2022-05-10 11:56:40,653 # main(): This is RIOT! (Version: 2022.04-devel-941-gcf568-HEAD)
2022-05-10 11:56:40,654 # Hello World!
2022-05-10 11:56:40,659 # You are running RIOT on a(n) esp32-wroom-32 board.
2022-05-10 11:56:40,662 # This board features a(n) esp32 MCU.

The behavior can be reproduced both on current master (59ec6f1) as well as with using #17601.

I am using the current toolchain setup as included in RIOT (xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2-patch3) 8.4.0).

Steps to reproduce the issue

Flash vanilla gnrc_networking on esp32-wroom-32 board. You should see the serial disconnecting periodically roughly once a second.

Expected results

gnrc_networking should be stable :-)

Actual results

see above

Versions

see above

@haukepetersen haukepetersen added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label May 10, 2022
@haukepetersen
Copy link
Contributor Author

Just gave this issue some more testing on my notebook (different host machine then the other two I tried before): with both using Docker and a native toolchain installed via the provided installation scripts (/dist/tools/esptools) everything is working just fine. I don't quite now what is going wrong on my other hosts, but it seems that this is somehow related to local misconfiguration. @miri64 was so nice to also confirm everything working as expected using the identical hardware board.

As this seems to a local problem on my side, I consider this issue solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

1 participant