Closed
Description
Running the following sequence twice in the same REPL causes CircuitPython to reset (not into safe mode, just a "normal" reset!)
Tested on a kaluga with DEBUG=1
at f2204d7
(tio is my terminal program)
>>> import busio, board; bus = busio.I2C(board.IO10, board.IO11); bus.try_lock(); bus.scan(); bus.deinit()
True
[11, 112]
>>> import busio, board; bus = busio.I2C(board.IO10, board.IO11); bus.try_lock(); bus.scan(); bus.deinit()
True
[tio 10:05:07] Disconnected
[tio 10:05:41] Connected
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
gdb debugging doesn't show anything interesting. hardware debug console doesn't show anything interesting. I don't know how to continue debugging this sort of reset (e.g., to set a breakpoint to "catch" it)
I (15316) gpio: GPIO[11]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (15316) gpio: GPIO[10]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (20846) gpio: GPIO[11]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (20846) gpio: GPIO[10]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
<----- ( second bus.scan() call happens here) ---->
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x8 (TG1WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40028200
SPIWP:0xee
mode:DIO, clock div:2
load:0x3ffe6100,len:0x8
load:0x3ffe6108,len:0x1838
load:0x4004c000,len:0x944
load:0x40050000,len:0x2cec
entry 0x4004c1bc
I (51) boot: ESP-IDF v4.3-dev-1198-gd06744f5e 2nd stage bootloader