DB ms
DB ms

Reputation: 39

remove micropython from esp and install esp32 firmwae

i have a esp32 and afew month ago i installed micropython on it , now after erase_flash it with

python3 esptool.py erase_flash

and now when i want to run a simple

Serial.print("hellow world"); 

it pop up this

20:44:12.356 -> Th�l���ES%���"D��$DD$ZI$DD$�#"DD�ets Jul 29 2019 12:21:46 20:44:20.138 -> 20:44:20.138 -> rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 20:44:20.138 -> configsip: 0, SPIWP:0xee 20:44:20.139 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 20:44:20.139 -> mode:DIO, clock div:1 20:44:20.139 -> load:0x3fff0030,len:1184

and also while uploading new script it syays

Sketch uses 259173 bytes (19%) of program storage space. Maximum is 1310720 bytes. Global variables use 22352 bytes (6%) of dynamic memory, leaving 305328 bytes for local variables. Maximum is 327680 bytes. esptool.py v4.5.1 Serial port /dev/ttyUSB0 Connecting..... Chip is ESP32-D0WD-V3 (revision v3.0) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: c8:f0:9e:52:c8:24 Uploading stub... Running stub... Stub running... Configuring flash size... Flash will be erased from 0x00001000 to 0x00005fff... Flash will be erased from 0x00008000 to 0x00008fff... Flash will be erased from 0x0000e000 to 0x0000ffff... Flash will be erased from 0x00010000 to 0x0004ffff... Compressed 18928 bytes to 13069... Writing at 0x00001000... (100 %) Wrote 18928 bytes (13069 compressed) at 0x00001000 in 1.4 seconds (effective 109.2 kbit/s)... Hash of data verified. Compressed 3072 bytes to 146... Writing at 0x00008000... (100 %) Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (effective 431.5 kbit/s)... Hash of data verified. Compressed 8192 bytes to 47... Writing at 0x0000e000... (100 %) Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 720.1 kbit/s)... Hash of data verified. Compressed 259536 bytes to 144032... Writing at 0x00010000... (11 %) Writing at 0x0001d7a2... (22 %) Writing at 0x00024e03... (33 %) Writing at 0x0002a183... (44 %) Writing at 0x0002f508... (55 %) Writing at 0x00035751... (66 %) Writing at 0x0003fd9a... (77 %) Writing at 0x00045941... (88 %) Writing at 0x0004ae7d... (100 %) Wrote 259536 bytes (144032 compressed) at 0x00010000 in 12.8 seconds (effective 161.7 kbit/s)... Hash of data verified.

Leaving... Hard resetting via RTS pin...

i want to recovry my esp32 like a first time when the had a wifi and bluetooth service on it

Upvotes: 0

Views: 505

Answers (2)

B. Irvine
B. Irvine

Reputation: 21

Your problem isn't the python as someone stated, you have a watchdog timeout issue. Go back and check your task loop for something hanging it up.

As for the garbage characters you're seeing, in my experiences with the ESP chips this is usually due to Baud Rate as another person has suggested.

Upvotes: 0

Barak Binyamin
Barak Binyamin

Reputation: 404

I had a similar issue, the serial port appeared inaccessible to PlatformIO for boot while the main python program was running on the esp32 dev board (was using a while loop and i2s)

Here's what worked to clear the device

  1. Connect to the serial port (with screen or putty) at a baud rate of 115200, for me the command was screen /dev/tty.usbserial-0001 115200
  2. Stop the running program with ctrl+c (then a python terminal pops up).
  3. Disconnect from the session (ctrl+a+k enter for screen)
  4. Upload an image with platformIO or the Arduino IDE as you would normally

Upvotes: 0

Related Questions