Simple fix when upload fails.



  • Add a small capacitor like 2,2uF between Ground and RST
    0_1513449798011_m5stack_fix_s.jpg



  • good, work!



  • If you do not have a capacitor available, you can also try to set the "Upload Speed" to 115200 in Arduino IDE.
    Of course the uploads are longer, but it did the job for me : i did not have any upload error since

    I also installed the latest CP210x Windows driver (v10.1.1 for Windows 10) but i don't think this is necessary



  • I am getting errors when trying to up load, it sees the board but gives he following errors:
    Arduino: 1.8.1 (Windows 7), Board: "M5Stack-Core-ESP32, QIO, 80MHz, 115200, None"

    Sketch uses 351999 bytes (26%) of program storage space. Maximum is 1310720 bytes.
    Global variables use 12024 bytes (4%) of dynamic memory, leaving 282888 bytes for local variables. Maximum is 294912 bytes.
    esptool.py v2.1
    Traceback (most recent call last):
    File "esptool.py", line 2524, in <module>
    File "esptool.py", line 2517, in main
    File "esptool.py", line 2246, in main
    File "esptool.py", line 177, in init
    File "site-packages\serial_init
    .py", line 88, in serial_for_url
    File "site-packages\serial\serialwin32.py", line 62, in open
    serial.serialutil.SerialException: could not open port 'COM6': WindowsError(23, 'Data error (cyclic redundancy check).')
    Failed to execute script esptool
    the selected serial port Failed to execute script esptool
    does not exist or your board is not connected

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.



  • Hi Stanszal,

    (1) Have you tried updating to latest Arduino IDE - version 1.8.5 ? Looks like you are using 1.8.1.

    (2) Then - connect the M5Stack to your USB port. Open Arduino IDE, under Tools, and under Port, your active Com port should be named and NOT greyed out. If its not greyed out then it should be working. If greyed out perhaps try a different USB port, or try connecting it directly to a USB port on your PC (not via a hub). Alternatively, install a new USB card or try another computer.

    You can check the USB driver is loaded by doing this: Connect your M5Stack to USB port... . Go to Device Manager - check "Ports (COM & LPT) - the Silicon Labs CP210X driver should be listed.

    (3) Next - load a sketch. If you then get an upload error when uploading a sketch, either choose a lower speed as suggested above or fit a capacitor while uploading (as suggested above). I used the capacitor method - mine looks like a 22 uF.

    These measures work for Windows 10.



  • I updated the Arduino IDE to 1.8.5 Installed the usb drivers, it still doesn'y work. When the M5 is plugged in it shows up in the device manager and the port is working correctly. so I know the usb port is good. I also tried lowering the transfer sped as suggested and that doesn't help. I will try to find a capacitor some where. It is kind of disappointing that with all the work that went into this it has problems connecting.



  • What about in the Arduino IDE "-- under Tools, and under Port, your active Com port should be named and NOT greyed out. " Is the com port greyed out ? If greyed out it's still not going to work - if white then the port should be ready to go. Then you should just need the capacitor. With the capacitor correctly in place the upload should work fine every time.

    IMO the issue with the serial port is a windows / usb port thing. Not the M5Stack itself. It worked fine on 2 out of 3 Windows 10 machines that I tried, including an old Core 2 HP laptop. Not so much on my Gigabyte X58 motherboard.



  • I tried the cap, here is a screen shot of whats the problem. The pc is seeing the port, it recognises the driver and is working.
    It is trying to upload, but times out I tried both baud rates neither works.![alt text](0_1515100345875_screen.jpg image url)



  • OK good. Perhaps nearly there....

    My 22 uF cap is polarised. I have the negative connected to RST and the other connected to ground. This works 100% reliably. I am sure I had it connected around the other way before and it did not work. And if I remove the cap altogether, then I get the same error message as yours above.



  • I tried reversing the cap, It still won't connect. It still has the same timeout problem. Changing baud rate doesn't help either.



  • Are you using VMWare ?
    Any reason you are using com port 30 ? I'm using com port 3.
    Are the cap wires inserted deep enough into the slots on the M5Stack ? I taped my cap to dupont wires. Even then it failed once as the pins were inserted properly.
    Under "Tools" you can change "Core debug level"to "Verbose"for more detailed feedback.
    The "Display"sketch you used works fine for me.



  • I am using win7 and arduino ide 1.8.5. The board automatically selects the com port when plugged in . The port varies .
    I have the cap soldered onto dupont leads and have them plugged all the way in. I tried both polarity's

    I keep getting the "timed out waiting for packet header " error. for whatever reason it won't connect. I have no problems with the ports with various Arduino boards, ESP8266's and ESP32's



  • Seems in order.
    Although my COM port doesn't vary. It's always the same.
    Presume you've tried another cap.....

    Anyone ?



  • @stanszalSimple fix when upload fails. 中说:

    I am using win7 and arduino ide 1.8.5. The board automatically selects the com port when plugged in . The port varies .
    I have the cap soldered onto dupont leads and have them plugged all the way in. I tried both polarity's

    I keep getting the "timed out waiting for packet header " error. for whatever reason it won't connect. I have no problems with the ports with various Arduino boards, ESP8266's and ESP32's

    As a note, I am having the exact same problem. I'm using PlatformIO, but the esptool output is the same indicating the same underlying error.

    When I look at the Serial Monitor, it's booted and here is the output:

    rst:0x1 (POWERON_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:0x3fff0018,len:4
    load:0x3fff001c,len:812
    load:0x40078000,len:0
    load:0x40078000,len:11404
    entry 0x40078aa0
    user code done

    I recovered mine using the EspressIF ESP32 Download Tool following the M5 guide for loading their MicroPython / Cloud IDE firmware.

    I wanted to play around with their cloud IDE anyway, but you should be able to use the factory firmware (also on GitHub) or one of the ones in your Arduino compile cache that you know works.

    Edit: Forgot to mention, I did have to use a 10uf cap across the GND and RST pins as described earlier in the thread in order to get the EspressIf tool to be able to connect.



  • After much fiddling around I managed to connect to it. However it is unreliable. This thing is a big disapointment. It is obvious a lot of work went into this thing, but they should have put in a little more to get it to work right out of the box.

    You can get Various Arduinos, ESP8266's and ESP32's for much less and they just work.


  • administrators

    0_1515468486302_QQ图片20180109112446.jpg
    so sorry, pls try this.



  • try what? add a cap? what type and volts? where can I get 1 cap? how about I send this back and you fix it so it works?



  • Hi Stanszal,

    Using the cap fix has worked for others on this device and other similar devices. It should be a reliable fix.
    You said you did manage to connect to the M5Stack but that it was unreliable.
    Perhaps something is not connected 100% ? You could check continuity with a multimeter.
    Not sure what uF cap you are using or if you've tried more than one ??
    My dupont leads are only taped and it works all the time - no unreliability except once when I didn't plug them in far enough.

    The previous photo appears to show an on-board solution, using a surface mount capacitor. I assume whatever 2.2 uF cap is available will be fine in regard to voltage.
    "Add a surface mount cap between RST and Ground".
    You can get 50x at Ali Express for US $3.30. The one linked below may be suitable.

    0_1515516031780_Untitled.png

    https://www.aliexpress.com/item/Patch-capacitance-1210-225-k-2-2-UF-50-v-X7R-ceramic-capacitor-10/32833335830.html?ws_ab_test=searchweb0_0,searchweb201602_2_10152_10151_10065_10344_10068_10130_10342_10547_10343_10340_10548_10341_10084_10083_10613_10615_10307_10614_10131_10132_10133_10059_10314_10534_100031_10604_10103_10142,searchweb201603_2,ppcSwitch_7&algo_expid=ef33f203-ecbf-4475-9a0c-bd39e4e7d998-23&algo_pvid=ef33f203-ecbf-4475-9a0c-bd39e4e7d998&transAbTest=ae803_5&priceBeautifyAB=0



  • Here is how I see it, I already spent over $40.00 for this thing. Yes, I can spend another $3.50 and order some caps, wait 5 to 6 weeks for them to arrive and they may or may not solve the problem. If this is a known issue you should have included a cap with the device.

    I tried 3 caps, 2 electrolitica and a polyester one. the result is the same, you need to try to upload the sketch multiple times to maybe get it to work once.



  • JimiT and ElectroMagnus, thank you for your help


登录后回复
 

与 M5Stack Community 的连接断开,我们正在尝试重连,请耐心等待