Go Down

Topic: MKZero not recognized as USB device - bootloader overwritten? (Read 2175 times) previous topic - next topic

Protonerd

Hi guys,

I recently bought an Arduino MKZero from the Arduino webpage, because I wanted ot experiment with the new M0+ processor playing music.

Yesterday I managed to have first success, after which I wanted to change the code and upload it again. Something happened though during upload because ever since the board is not recognized as an USB device. I have tons of other Arduino projects with AVRs, they work fine.

Here is the sequence:
- plug MKZero to host PC
- accidentally select Arduino/Genuino Zero (native USB port) as board tye
- then hit upload button
- code compiles, then starts to upload
- upload is abruptly stopped, some kind of error message came from IDE
- then the board is not any more regognized
- tried restarting host PC many times, to no avail


What went wrong?

I somehow have a bad feeling that due to the wrong board type selected the code simply overwrote the bootloader, so after a time the USB protocol handler was eaten too. If this is the case, this is a critical weakness in the concept. I never had this with AVRs. Is there no security feature stopping upload in case the bootloader integrity is endangered? Even if I buy a replacement board, human mistake like clicking the wrong board type can happen, if it bricks the board every time, it's a major fault.

Alas, if this is the real problem...which I'm not sure, just starting with ARM based controllers.

Thanks for helping me out in this!
Protonerd

ballscrewbob

Have you tried quickly double tapping the reset button to put it in bootloader mode.
It will appear on a new com port and you can then upload a simple sketch such as blink or bare minimum.

EDIT.

Also include in future posts the error message in its entirety but use CODE TAGS to do so ( </> )
Many times its easier to spot a simple issue in the error messages.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Protonerd

Have you tried quickly double tapping the reset button to put it in bootloader mode.
It will appear on a new com port and you can then upload a simple sketch such as blink or bare minimum.

EDIT.

Also include in future posts the error message in its entirety but use CODE TAGS to do so ( </> )
Many times its easier to spot a simple issue in the error messages.
Awesome!!! It did solve the issue!!!

Just to satisfy my curiosity, is it a hidden bootload-restore function?

As to the error messages: usually I do include them, but it did happen so unexpectedly, that I started right away to initiate countermeasures (i.e. reboot, reconnect etc.) and the message was lost.

I love this community! Help is always only a few minutes away!

ballscrewbob

It not a "bootloader restore".
A few boards have this ability but some depend on you pressing reset during upload at a very specific time.


It simply puts it into bootloader mode and is a pretty well known feature at this point when things seem to go amiss.

There is a much more technical aspect to it but I don't know enough to explain it only enough to be dangerous LOL.


It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Go Up