How to reset cycled ESP32? "Device or recource busy"...
How to reset cycled ESP32? "Device or recource busy"...
I was make mistake while programs ESP32 and now it cycles with no point to stop. Esptool and picocom says "Device or resource busy" and connection fails. Is it possible to reset it or fully erase flash in this case?
Re: How to reset cycled ESP32? "Device or recource busy"...
you can always use esptool.py to erase the flash.
esptool.py -p <port name> erase_flash
esptool.py -p <port name> erase_flash
Re: How to reset cycled ESP32? "Device or recource busy"...
Code: Select all
vitaly@L521X:~$ esptool.py --port /dev/ttyUSB0 erase_flash
esptool.py v2.8
Serial port /dev/ttyUSB0
Traceback (most recent call last):
File "/usr/local/bin/esptool.py", line 3201, in <module>
_main()
File "/usr/local/bin/esptool.py", line 3194, in _main
main()
File "/usr/local/bin/esptool.py", line 2883, in main
esp = ESPLoader.detect_chip(each_port, initial_baud, args.before, args.trace)
File "/usr/local/bin/esptool.py", line 273, in detect_chip
detect_port = ESPLoader(port, baud, trace_enabled=trace_enabled)
File "/usr/local/bin/esptool.py", line 237, in __init__
self._port = serial.serial_for_url(port)
File "/home/vitaly/.local/lib/python2.7/site-packages/serial/__init__.py", line 88, in serial_for_url
instance.open()
File "/home/vitaly/.local/lib/python2.7/site-packages/serial/serialposix.py", line 268, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 16] could not open port /dev/ttyUSB0: [Errno 16] Device or resource busy: '/dev/ttyUSB0'
Re: How to reset cycled ESP32? "Device or recource busy"...
You have to terminate all other programs which use that port. Eventually you have to restart you PC. And you could try to run that esptool.py command with sudo.
Re: How to reset cycled ESP32? "Device or recource busy"...
Oh, God! You're my savior! Thank you, it works!
Re: How to reset cycled ESP32? "Device or recource busy"...
Hi,
lets see if someone is answering after that long time.
I'm working with a es32 in thonny. when i upload the main.py i cant change it again. i must reflash the µP firmware. now i tried the "esptool.py -p <port name> erase_flash" command. now the esp is stuck in a restart-loop. i tried to flash the firmware with thonny again. now the REPL shows the following "error"
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:5656
load:0x40078000,len:13136
load:0x40080400,len:4356
entry 0x400806b0
E (682) psram: PSRAM ID read error: 0xffffffff
E (682) spiram: SPI RAM enabled but initialization failed. Bailing out.
E (683) spiram: SPI RAM not initialized
Re-enable cpu cache.
abort() was called at PC 0x400d48be on core 0
Backtrace:0x40094ec5:0x3ffe3b60 0x400954b5:0x3ffe3b80 0x400991a1:0x3ffe3ba0 0x400d48be:0x3ffe3c10 0x400d490f:0x3ffe3c30 0x40082856:0x3ffe3c50 0x40082037:0x3ffe3c70 0x40078fd0:0x3ffe3c90 |<-CORRUPTED
ELF file SHA256: b804787c441836c4
any ideas why?
THANK YOU!
lets see if someone is answering after that long time.
I'm working with a es32 in thonny. when i upload the main.py i cant change it again. i must reflash the µP firmware. now i tried the "esptool.py -p <port name> erase_flash" command. now the esp is stuck in a restart-loop. i tried to flash the firmware with thonny again. now the REPL shows the following "error"
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:5656
load:0x40078000,len:13136
load:0x40080400,len:4356
entry 0x400806b0
E (682) psram: PSRAM ID read error: 0xffffffff
E (682) spiram: SPI RAM enabled but initialization failed. Bailing out.
E (683) spiram: SPI RAM not initialized
Re-enable cpu cache.
abort() was called at PC 0x400d48be on core 0
Backtrace:0x40094ec5:0x3ffe3b60 0x400954b5:0x3ffe3b80 0x400991a1:0x3ffe3ba0 0x400d48be:0x3ffe3c10 0x400d490f:0x3ffe3c30 0x40082856:0x3ffe3c50 0x40082037:0x3ffe3c70 0x40078fd0:0x3ffe3c90 |<-CORRUPTED
ELF file SHA256: b804787c441836c4
any ideas why?
THANK YOU!
Re: How to reset cycled ESP32? "Device or recource busy"...
I think your ESP32 does not have PSRAM, and
flashed wrong type of firmware(GENERIC_SPIRAM)
Try the firmware, BOARD=GENERIC compile option, and flash it.
flashed wrong type of firmware(GENERIC_SPIRAM)
Try the firmware, BOARD=GENERIC compile option, and flash it.
Re: How to reset cycled ESP32? "Device or recource busy"...
Yeah, thats it.
Thank you!
Do you have any idea, how i can stop the ESP32 (with main.py saved in it) so i can save a new code-file in it? the only solution, i found, is to reflash the µP firmware..
(at my other esp32 board it works if i press RUN->disconnect->START/STOP, on that board it doesnt)
Thanks again
Thank you!
Do you have any idea, how i can stop the ESP32 (with main.py saved in it) so i can save a new code-file in it? the only solution, i found, is to reflash the µP firmware..
(at my other esp32 board it works if i press RUN->disconnect->START/STOP, on that board it doesnt)
Thanks again