Nothing showing on M5Core2 when connected to USB power and unable to upload
-
So, after a week with the board running fine, I attempted to upload a sketch today and the unit is blank. When I press the power button the unit does not turn on, neither does it turn on when I connect to USB.
I have tried M5Burner to restore the factory image but I also get an error there too, the full error log is here:
====================================
--chip auto --port /dev/tty.wchusbserial54FC0182651 --baud 1500000 --before default_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x000 /Applications/M5Burner.app/Contents/Resources/packages/firmware/1f6084853a1fac200d66584a1a405017.bin
esptool.py v3.3.2-dev
Serial port /dev/tty.wchusbserial54FC0182651
Traceback (most recent call last):
File "/Applications/M5Burner.app/Contents/Resources/packages/tool/serial/serialposix.py", line 265, in open
self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
OSError: [Errno 16] Resource busy: '/dev/tty.wchusbserial54FC0182651'During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/M5Burner.app/Contents/Resources/packages/tool/esptool.py", line 5399, in <module>
_main()
File "/Applications/M5Burner.app/Contents/Resources/packages/tool/esptool.py", line 5392, in _main
main()
File "/Applications/M5Burner.app/Contents/Resources/packages/tool/esptool.py", line 4699, in main
esp = esp or get_default_connected_device(ser_list, port=args.port, connect_attempts=args.connect_attempts,
File "/Applications/M5Burner.app/Contents/Resources/packages/tool/esptool.py", line 110, in get_default_connected_device
_esp = ESPLoader.detect_chip(each_port, initial_baud, before, trace,
File "/Applications/M5Burner.app/Contents/Resources/packages/tool/esptool.py", line 363, in detect_chip
detect_port = ESPLoader(port, baud, trace_enabled=trace_enabled)
File "/Applications/M5Burner.app/Contents/Resources/packages/tool/esptool.py", line 320, in init
self._port = serial.serial_for_url(port)
File "/Applications/M5Burner.app/Contents/Resources/packages/tool/serial/init.py", line 88, in serial_for_url
instance.open()
File "/Applications/M5Burner.app/Contents/Resources/packages/tool/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/tty.wchusbserial54FC0182651: [Errno 16] Resource busy: '/dev/tty.wchusbserial54FC0182651'Not sure what to do now... is my M5Core2 bricked...?
-
No, its very hard to brick an esp32.
In M5Burner, have you tried just erasing the firmware before trying to write?
If you uploaded an Arduino sketch to the core2 then you will need to erase the sketch before doing anything.
Also try accessing and erasing the core2 after cold booting the computer. -
I guess I have posted twice more or less about the same thing @ajb2k3 sorry. I installed the ArduinoIDE on to my MacBook Pro, followed the M5Stack instructions again to install the boards, library and drivers, and I get the same thing on this machine as I do on my iMac. here's the error...
I genuinely think my M5Core2 is bricked. I tried to do some research and it appears there's no successful way to get the core2 into BOOT mode. Sigh...
Erase Flash
esptool.py v3.3.2-dev
Serial port /dev/tty.wchusbserial54FC01826501
Connecting...
.
.
.A fatal error occurred: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html -
Do you know what a cold bout means?
The issue you are seeing is caused by the core writing the wrong data to the core 2 usb chip and so the computer is crashing as it’s confused. I have experienced this my self and while it is annoying, it is recoverable from.
One method is to press the reset button on the core 2 after M5 Burner starts to access the series port. It takes practice and timing but you need to interrupt the boot process to get M5Burner to trigger the erase before the buggy code starts.
The next method is to remove the base and use an external UART2USB connected to the internal MBus connector or UART pins and bypass the chip to again erase the bad code from the esp32. Again all is not lost and it is recoverable. -
So cold boot the core2 you mean? Your previous post said cold boot the computer which I thought you meant my iMac!! Sorry.
OK, I will try this approach. So I understand, launch m5burner, select factory firmware, but select erase before trying to burn factory image. When selecting erase, press the reset button on the core2 at a time when the M5burner has just accessed the core2. Is that correct?
Also, the code that was running on the M5Core2 previously was running fine without issue so not sure where any buggy code came from.
Thanks for the suggestions though @ajb2k3 - I will try this shortly.
-
Err yeh cold boot the mac it is very susceptible to the unavailable resource issue. And yes press the reset button on the core2 the time period is a fraction of a second and took me over 20 tries to do it.
-
I've "semi-bricked" a Core2 a few times, mostly by uploading code with the wrong board type selected. But also by subtle memory errors uploaded programs. Reinstalling the "BIOS" with the burner has always brought it back to life.
-
@wsanders unfortunately the music man has softbricked his core2 which blocks M5Burner from being to accessing the usb device but also crashes the USB bud on macs
-
@wsanders Can I ask what you mean by reinstalling the "BIOS" please? Do you mean the factory image? If so, M5Burner isn't able to connect to the M5Core2, hence my thinking that this board is actually 'hard' bricked i.e. irrecoverable.
Again, if this is so, it is a pretty nasty design flaw by M5Stack in M5Core2 users not being able to place their ESP32S3 board into BOOT mode which would allow a recovery/restore to take place. As far as I can tell, BOOT mode on the M5Core2 is simply not possible.
-
@themusicman Its a lot harder to soft brick the S3 cores unlike the Core/Core because the S3 have built in USB controllers where as the the Core/Core2 need a dedicated USB adapter to communicate.
-
Update: I have returned the M5Core2 device purchased last week to the dealer I bought it from, something they had absolutely no issue with doing for me. They are going to issue a replacement. Now I need to try to identify what caused the M5Core2 to go into this rather ridiculous fail mode. I simply left it running overnight with code that was working the previous evening, and when I came to use it the following afternoon it was unresponsive.
Let's hope the same thing doesn't happen again, which if it does, will sadly prematurely end my relationship with M5Stack devices :)
-
@themusicman I had this happen to an M5Station but nothing else.