Did I brick it?

mmcginty
Posts: 2
Joined: Fri Sep 22, 2017 4:52 am

Did I brick it?

Postby mmcginty » Fri Sep 22, 2017 5:39 am

(Using a dev board from elektrodragon.com.) I was trying to build/flash the wifi\smart_config example (after great success modifying/running the pcnt example. and building/running a few others.)

All the build output looked normal, no errors reported. Flashing appeared to succeed. Here is the startup output:

Code: Select all

I (833) boot: Loaded app from partition at offset 0x10000
I (833) boot: Disabling RNG early entropy source...
I (840) cpu_start: Pro cpu up.
I (851) cpu_start: Starting app cpu, entry point is 0x40080ed0
0x40080ed0: call_start_cpu1 at S:/esp/esp-idf/components/esp32/cpu_start.c:219

I (0) cpu_start: App cpu up.
I (883) heap_init: Initializing. RAM available for dynamic allocation:
I (904) heap_init: At 3FFAE2A0 len 00001D60 (7 KiB): DRAM
I (923) heap_init: At 3FFB8348 len 00027CB8 (159 KiB): DRAM
I (942) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (961) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (981) heap_init: At 4008F9D4 len 0001062C (65 KiB): IRAM
I (1000) cpu_start: Pro cpu start user code
I (1061) cpu_start: Starting scheduler on PRO CPU.
I (197) cpu_start: Starting scheduler on APP CPU.
I (267) wifi: wifi firmware version: 4acbf1f
I (267) wifi: config NVS flash: enabled
I (267) wifi: config nano formating: disabled
I (267) system_api: Base MAC address is not set, read default base MAC address f
rom BLK0 of EFUSE
I (277) system_api: Base MAC address is not set, read default base MAC address f
rom BLK0 of EFUSE
I (307) wifi: Init dynamic tx buffer num: 32
I (307) wifi: Init data frame dynamic rx buffer num: 32
I (307) wifi: Init management frame dynamic rx buffer num: 32
I (307) wifi: wifi driver task: 3ffb8940, prio:23, stack:4096
I (317) wifi: Init static rx buffer num: 10
I (317) wifi: Init dynamic rx buffer num: 32
Looks like things start to go south here...

Code: Select all

t (327) wifi: Init rx ampdu len mbloEcxkc:e7p
iIo n( 3i2n7 )t hwriefaid:  TIhnrieta dl-l2d:e
aTcr arcexb acakm pdu( meonsttr rye cmebnlto ccka:l4l l
sIt (3)3:7)
  w ifFii:l ew i"fSi: /pomwseyrs 3m2a/nmainggewr3 2ta/slki:b /0pxy3ftfhco4n824.4
l /ptrhiro: e21 satdaicngk.: p2y5"6,0
Then Python clearly loses connection to the virtual serial port...

Code: Select all

ine 801, in __bootstrap_inner
    self.run()
  File "S:/msys32/mingw32/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "S:/esp/esp-idf/tools/idf_monitor.py", line 118, in _run_outer
    self.run()
  File "S:/esp/esp-idf/tools/idf_monitor.py", line 198, in run
    data = self.serial.read(self.serial.in_waiting or 1)
  File "S:/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", li
ne 257, in in_waiting
    raise SerialException("ClearCommError failed ({!r})".format(ctypes.WinError(
)))
SerialException: ClearCommError failed (WindowsError(5, 'Access is denied.'))
(I kept a copy of the complete output, but posting here seemed unnecessary and would've been even more annoying.)

Now the USB driver can't connect, it cycles between connecting/disconnecting about once every second or two. Tried using the buttons to put it in flash mode, but I'm assuming it works the same as ESP8266, can't find the docs for it, I guess because all the tools do without it?

So is it junk or can it be recovered?

TIA,
MM

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Did I brick it?

Postby ESP_Angus » Fri Sep 22, 2017 6:55 am

It's very unlikely to be bricked (the only real way to brick an ESP32 is to turn on secure boot features and then lose the key, or really break the flash encryption config and then lose the key.)

The jumbled output looks like two tasks printing to stdout from low-level code and talking over each other.
mmcginty wrote:(Using a dev board from elektrodragon.com.)
Do you have a link to this board?

If I had to guess, I'd guess there's a power problem with the board (or however you're powering it) which is causing it to crash in weird ways and boot loop, and causing the USB chip to reset itself repeatedly as well. Probably didn't appear for programs which weren't using Wifi, because the power draw is a lot lower.

The other thing you can try doing is holding down the "BOOT" button or "IO0" button (if it has one) while you connect it to USB & power. This will prevent it from booting the smartconfig sketch and trying to start up wifi.

mgleason_3
Posts: 44
Joined: Mon Nov 07, 2016 5:04 pm

Re: Did I brick it?

Postby mgleason_3 » Fri Sep 22, 2017 7:21 am

Have you tried erasing and re-flashing?

One suggestion would be to start with a known working sample. e.g.:
  1. cd into one of the sample - e.g.: "cd esp-idf/examples/get-started"
  2. completely erase the flash: "make erase_flash"
  3. Then make, burn and run the sample: "make flash monitor"

f.h-f.s.
Posts: 214
Joined: Thu Dec 08, 2016 2:53 pm

Re: Did I brick it?

Postby f.h-f.s. » Fri Sep 22, 2017 10:21 am

Could it be the cable, or the usb uart chip on the dev board?
You can always try to power the ESP32 directly and attach a serial ttl to the rx/tx to see if the chip still works.

mmcginty
Posts: 2
Joined: Fri Sep 22, 2017 4:52 am

Re: Did I brick it?

Postby mmcginty » Fri Sep 22, 2017 10:27 pm

ESP_Angus wrote:It's very unlikely to be bricked (the only real way to brick an ESP32 is to turn on secure boot features and then lose the key, or really break the flash encryption config and then lose the key.)

The jumbled output looks like two tasks printing to stdout from low-level code and talking over each other.
mmcginty wrote:(Using a dev board from elektrodragon.com.)
Do you have a link to this board?

If I had to guess, I'd guess there's a power problem with the board (or however you're powering it) which is causing it to crash in weird ways and boot loop, and causing the USB chip to reset itself repeatedly as well. Probably didn't appear for programs which weren't using Wifi, because the power draw is a lot lower.

The other thing you can try doing is holding down the "BOOT" button or "IO0" button (if it has one) while you connect it to USB & power. This will prevent it from booting the smartconfig sketch and trying to start up wifi.
Good call! I should've thought of power, which it's getting from USB but I had it plugged into a cheesy hub. Plugged it directly into the tower, good to go! Thank you very much for your assistance! The link to that board, in case you're still curious: http://www.electrodragon.com/product/esp32-devkitc/.

Thanks again,
MM

Who is online

Users browsing this forum: No registered users and 103 guests