Simple fix when upload fails.
I also tried various Capacitors with no effect. At least two methods were helpfull:
(1) use a short USB(A) - USB(C) cable (10 cm)
(2) remove the bottom plate while uploading (afterwards it runs with an 1m cable @921600 baud).
@rmr Hi Rmr,
As @skelstar correctly pointed out above, if you have an issue reflashing then the reset button can be used - the RED button which has three functions: on/off/reset).
This is actually stated in the official setup instructions under step 8 -- though it is easy to overlook / forget about when busy working through the install procedure. See pic below.
Using the reset button as follows should work:
When the Arduino IDE tries to connect to M5 - when it shows this on-screen - "Connecting .... ____ ..... ____ ......." , you need to press the red reset button. Press it twice - first time short, then hold 5 seconds. Then press twice quickly - click, click. It probably start to beep - just repeat the above.. or even just keep holding the button in.... You should find after some combination of the above it will connect. You may have to try a second time.
After doing it a few times you should "get the knack" and be able to reliably get it to load first time, each time.
Using an earlier model M5, it seems on occasion - just using the capacitor may not work. In this case I have found the reset button to be effective.
If neither capacitor or reset button work then there may be an actual problem with the hardware (which I personally have not experienced).
@jimit Hi Jimit,
I forgot to tell, that I am using the new 2018 model (with 9DOF-Sensor and USB-C). I have no Chance to press the Reset-Button in time , because there are only a few dots when "Connecting ..."at the beginning of upload. Also pressing the Reset-Button (before connecting) during the upload has no success.
But the Problem is not the start of the upload. Sometimes the upload continues up to 30 percent or 50 percent. Then there is a "timeout for waiting fot packet header".
But the upload is always ok, when I ...
(1) use a short USB-cable (I tried various 1m long cables at various USB ports (2.0 and 3.0), but no one performs)
(2) remove the Bottom-Plate (then a 1m cable is ok).
BTW Is there an example Code for the 9DOF-Sensor (new in 2018 model)?
BTW The "gift" wasn't in my development kit (does'nt matter, I have enough of them).
Official recommendations for use:
- Short USB cable is the official recommendation.
- Arduino IDE upload speed - 119,200 - is the official recommendation.
- Power input to M5Stack - 5 - 5.5 V @ 500 mA - is the official recommendation.
It may be you are not getting enough power to your M5Stack.
When you remove the bottom plate and run the M5, it is no longer having to charge the battery. In this case it would cope better with a lower than required power supply.
How is it connected to USB ?
If using a hub dis-connect other devices AND connect a power supply to the USB hub.
You can test the USB power supply to the M5 using a USB power meter.
If those measures do not resolve it, then test on another PC using a different USB port.
Interesting information. I only have the one device here so can't say if the "fixes" that have worked are universal. I just put together an image to help illustrate what I was talking about on the header pins for another post.
I will reiterate that the noted plastic spacer on the bottom board, proto board, and 850mAh battery expansion I have were not fully seated. This resulted in slightly male pins (0.5 mmm give or take) and intermittent connections with the female headers in the MBus stack. The plastic spacer being up also acted as a stop preventing full engagement with the female sockets in the header and resulted in programming problems, use of the capacitor on the RST\GND thru the base plate, and power feed problems to the Core from the base and battery packs. While I haven't used them, I suspect I'd have had intermittent issues with all other pin functions thru the header stack without my little tune up :)
Again, may not be a universal thing since I only have one system but I'd highly suggest anyone using the system take a few moments to seat the space shown on the assorted board. My suspicion is that part of RMR's issues sound related to the pin engagement and is why it works when the base (or other boards) are pulled off.
Slightly shorter male pins exposed (I thought the word, it just didn't make it to the fingers)
Quick note that you can edit your posts after posting....just left click on the 3 dots on the right of your post....
Excellent contribution that.... makes your points very clear. I'm sure that will be very helpful to anyone with this issue.
This does not seem to be a universal issue but it does seem to affect some units.
Pleasing that it seems it can be addressed once identified.
Hopefully it helps rmr.
@jimit Thanks for the Edit pointer and feedback. Good info about the power button too (like most guys, I look at manuals after I bang my head on the wall a bit).
One update - I had separated the modules to take a look a the 850 mAhr batter board earlier today. Ended up having fits getting the M5Stack to work again when I re-stacked - even with just the bottom board and core and having the spacer on the bottom board pressed all the way down. I ended up reverting to just removing the pin spacer (that was a PIA) to see if that helped. I did manage to get things working again but it took some fussing. End of the day, I think it comes down to tolerance accumulations on the pin header, socket header, plastic assemblies and then is compounded by the tapers on the male pins.
I am using a direct USB-Connection to my Desktop-PC. A connection to my laptop has the same result.
But there is another problem I got when using the MP9250 example software and the "Playing MP3 from SD-Card" example:
Even when I'm just approaching to the M5stack (not touching) I often get several failures such as a reboot or a freeze. It doesn't depend wether the bottom is connected or not. I extra put a sheet of paper between my finger and the M5unit to be shure, there is no direct contact. I took a video of it, but is ist to big to upload it.
So I think my m5stack has a hardware problem. I'd like to test it with another M5stack but I have no other one and I dont want to buy one more because I don't know if there might be the same problem.
I have exactely the same problem with my M5STack I have resolved this by remove the battery part (Bottom )