M5Stick C - Cannot flash firmware

  • Hi everybody,

    I received my M5Stick some days ago (and it is a so great hardware ! So tiny an nice !) but don't even succeed to flash it the UITools firmware. I think for the moment it is the hardware test which is installed and running (it tells "wifi test" and after "data" in green and red).

    I tryed with my MacBook Pro with MacOS Catalina, with Windows 10 on a VM and on a real PC with Windows 10 with no results.

    I tryed with M5Burner ans with Arduino IDE also.

    I tryed with the a wire connecting GND to G0 too.

    I tryed with another USB cable too.

    All the time the same error :

    • When the M5Stick is OFF:
    Serial port COM3''
    A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header 
    • When the M5Stick is ON :
    Serial port COM3
    A fatal error occurred: Response doesn't match request

    The COM3 port is looking like that in the device manager (I installed the USB serial driver CP210X ) :
    alt text

    I didn't try to add a cap somewhere on the board like some folks did but I'm asking myself if this could be a solution.

    Could you please guide me ? I don't know what to test now.

    Thanks a lot

  • 1 . long press the power button, when the log show "Connecting.................._____."

    1. seting the upload speed to 115200

    2. connecting GND to G0 , when you upload program.

    3. could you erase the flash? then burn the firmware again?

    If none of the above works, please contact our store , thanks

  • Thanks a lot for your quick answer !
    With a long press on the power button, the error message is changing a little bit :
    alt text

    It can be red "Failed to connect to Espressif device" instead of "ESP 32".

    2/ I already use this setting
    3/ I already do it. Do I need to wire it for firmware upload (M5Burner) and programs (Arduino IDE) ?
    4 / When I erase the flash with M5Burner I have the same error. Ones I got "Finished" instead but after the flash was not erased and the usual hardware test pgm launched...

  • contact the store , then them will help you solve .

  • I bought it on Banggood. I contacted them. The pb will be to ship another M5stick and wait for 3 weeks again... I'm in France.

  • Are you sure you set the correct baud rate in the flasher module? I had the same issue and reducing the baud-rate to 115200 worked for me.

  • I was having the same problem, but it's working now. I use a Macbook Pro running Catalina.

    Received my M5StickC today, and it looks great, but the Arduino AVR ISP and AVR ISP II programmers couldn't connect to it. I installed updated CP210X drivers, but that didn't help. Then I tried the suggestions from m5stack above, and when I connected G0 to GND, then clicked the "Upload" button in the Arduino IDE, it worked.

  • @frogman Thanks for the tip. I also run Mac OS X Catalina and found that this procedure worked for me with the addition of powering off the M5StickC following upload then powering on. I have another Mac (or two) running previous OS and the issue is not evident.

  • Hi Guys

    I'm on Windows 10
    as everybody...same issue:

    esptool.py v2.5.0
    Serial port COM1

    A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header

    SOLVED buy:

    1/ Connecting USB cable till the end (My mistake was not to force it till the end...in fact it enters inside the MR StickC till the end)

    2/ installing official driver from this link:

    3/ And.... Changing USB port!
    More details here


    I just connect M5Stick C to new port, saw a new COM4 device under "Device Manager"

    4/ Using Burner:
    a/Erase StickC at minimum speed, and trought new COM4 port in my case


    esptool.py v2.5.0
    Serial port COM4
    Detecting chip type... ESP32
    Chip is ESP32-PICO-D4 (revision 1)
    Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse
    MAC: xx.xx.xx.xx (your MAC adress , I erased mine)
    Uploading stub...
    Running stub...
    Stub running...
    Erasing flash (this may take a while)...
    Chip erase completed successfully in 5.4s
    Hard resetting via RTS pin...

     b/ Downloaded UIFLow-V1.3.2...and BURN

    --chip esp32 --port COM4 --baud 750000 --before default_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x10000 application_0x10000.bin 0x1000 bootloader_0x1000.bin 0x1f0000 fatfsImg_0x1f0000.img 0x8000 partitions_0x8000.bin

    esptool.py v2.5.0
    Serial port COM4
    Chip is ESP32-PICO-D4 (revision 1)
    Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse
    MAC: xxxxxxxxx
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 750000
    Configuring flash size...
    Auto-detected Flash size: 4MB
    Compressed 1857936 bytes to 1315975...

    Writing at 0x00010000... (1 %)
    Writing at 0x00014000... (2 %)
    Writing at 0x00018000... (3 %)
    Writing at 0x0001c000... (4 %)
    Writing at 0x00020000... (6 %)
    Writing at 0x00024000... (7 %)
    Writing at 0x00028000... (8 %)
    Writing at 0x0002c000... (9 %)
    Writing at 0x00030000... (11 %)
    Writing at 0x00034000... (12 %)
    Writing at 0x00038000... (13 %)
    Writing at 0x0003c000... (14 %)
    Writing at 0x00040000... (16 %)
    Writing at 0x00044000... (17 %)
    Writing at 0x00048000... (18 %)
    Writing at 0x0004c000... (19 %)
    Writing at 0x00050000... (20 %)
    Writing at 0x00054000... (22 %)
    Writing at 0x00058000... (23 %)
    Writing at 0x0005c000... (24 %)
    Writing at 0x00060000... (25 %)
    Writing at 0x00064000... (27 %)
    Writing at 0x00068000... (28 %)
    Writing at 0x0006c000... (29 %)
    Writing at 0x00070000... (30 %)
    Writing at 0x00074000... (32 %)
    Writing at 0x00078000... (33 %)
    Writing at 0x0007c000... (34 %)
    Writing at 0x00080000... (35 %)
    Writing at 0x00084000... (37 %)
    Writing at 0x00088000... (38 %)
    Writing at 0x0008c000... (39 %)
    Writing at 0x00090000... (40 %)
    Writing at 0x00094000... (41 %)
    Writing at 0x00098000... (43 %)
    Writing at 0x0009c000... (44 %)
    Writing at 0x000a0000... (45 %)
    Writing at 0x000a4000... (46 %)
    Writing at 0x000a8000... (48 %)
    Writing at 0x000ac000... (49 %)
    Writing at 0x000b0000... (50 %)
    Writing at 0x000b4000... (51 %)
    Writing at 0x000b8000... (53 %)
    Writing at 0x000bc000... (54 %)
    Writing at 0x000c0000... (55 %)
    Writing at 0x000c4000... (56 %)
    Writing at 0x000c8000... (58 %)
    Writing at 0x000cc000... (59 %)
    Writing at 0x000d0000... (60 %)
    Writing at 0x000d4000... (61 %)
    Writing at 0x000d8000... (62 %)
    Writing at 0x000dc000... (64 %)
    Writing at 0x000e0000... (65 %)
    Writing at 0x000e4000... (66 %)
    Writing at 0x000e8000... (67 %)
    Writing at 0x000ec000... (69 %)
    Writing at 0x000f0000... (70 %)
    Writing at 0x000f4000... (71 %)
    Writing at 0x000f8000... (72 %)
    Writing at 0x000fc000... (74 %)
    Writing at 0x00100000... (75 %)
    Writing at 0x00104000... (76 %)
    Writing at 0x00108000... (77 %)
    Writing at 0x0010c000... (79 %)
    Writing at 0x00110000... (80 %)
    Writing at 0x00114000... (81 %)
    Writing at 0x00118000... (82 %)
    Writing at 0x0011c000... (83 %)
    Writing at 0x00120000... (85 %)
    Writing at 0x00124000... (86 %)
    Writing at 0x00128000... (87 %)
    Writing at 0x0012c000... (88 %)
    Writing at 0x00130000... (90 %)
    Writing at 0x00134000... (91 %)
    Writing at 0x00138000... (92 %)
    Writing at 0x0013c000... (93 %)
    Writing at 0x00140000... (95 %)
    Writing at 0x00144000... (96 %)
    Writing at 0x00148000... (97 %)
    Writing at 0x0014c000... (98 %)
    Writing at 0x00150000... (100 %)
    Wrote 1857936 bytes (1315975 compressed) at 0x00010000 in 24.7 seconds (effective 601.2 kbit/s)...
    Hash of data verified.
    Compressed 22464 bytes to 14066...

    Writing at 0x00001000... (100 %)
    Wrote 22464 bytes (14066 compressed) at 0x00001000 in 0.3 seconds (effective 621.7 kbit/s)...
    Hash of data verified.
    Compressed 2162688 bytes to 128819...

    Writing at 0x001f0000... (12 %)
    Writing at 0x001f4000... (25 %)
    Writing at 0x001f8000... (37 %)
    Writing at 0x001fc000... (50 %)
    Writing at 0x00200000... (62 %)
    Writing at 0x00204000... (75 %)
    Writing at 0x00208000... (87 %)
    Writing at 0x0020c000... (100 %)
    Wrote 2162688 bytes (128819 compressed) at 0x001f0000 in 2.6 seconds (effective 6542.0 kbit/s)...
    Hash of data verified.
    Compressed 3072 bytes to 124...

    Writing at 0x00008000... (100 %)
    Wrote 3072 bytes (124 compressed) at 0x00008000 in 0.0 seconds (effective 1535.3 kbit/s)...
    Hash of data verified.

    Hard resetting via RTS pin...

  • @fran said in M5Stick C - Cannot flash firmware:

    b/ Downloaded UIFLow-V1.3.2...and BURN

    You have to download & burn appropriate UIFlow version into Stick C,
    according to the version of UIFlow you're going to use

    SO...in fact you van download and burn now, as it will be default UIFlow version too
    (you can switch to older versions of UIFlow on top right corner of interface of UIFlow (Computer version, don't know for Web UI Flow version)


  • Are you erasing the firmware before burning the new firmware?
    You MUST ERASE the current firmware/arduino program BEFORE burning UIFlow!

  • @m5stack

    connecting GND to G0 , when you upload program.

    I was getting the same error getting serial data from my M5StickC Plus. Doing this to update the firmware fixed my issue.

    Much thanks!