[Arduino M0] Unable to upload sketch

Hi everyone,

I experience some trouble uploading sketches to my Arduino M0 (not pro) board.
I'm working with Arduino IDE 1.8.5 (Adruino SAMD boards v1.6.16) on a W7 64b laptop.

The M0 board is linked to COM35. When i try to upload the a sketch, "L" LED starts to blink faster and "TX" lights. After a second or two, "L" resumes to slow blinking and "TX" stops. Then I hear the Windows sound of device disconnection. A couple of minutes later, IDE shows the following :

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: sethe selected serial port avrdude: se does not exist or your board is not connected

The last line seems pretty strange...

I successfully uploaded blink sketch on Uno, Mega, micro, nano and Due boards with this setup.

Do I miss something important?

Thanks for your help.

Hi Flockiewicz,

On the Arduino Zero, double tapping the reset button in quick succession puts the board into bootloader mode. This allows recovery, forcing the bootloader to wait for an upload. It can be used whenever your board fails to detect that you're uploading some new code during normal operation.

Hopefully, this might also work with the Arduino M0?

Hi MartinL,

Double tapping reset button makes the "L" LED blink faster in the same way than when i try to upload a sketch.
While the LED is fast blinking (Bootloader mode???), the board is known as COM36 and not COM35. But nothing more happens when trying to upload a sketch.

Same problem on my five M0 boards. I checked every single one just to be sure that they were all in the same non-working state.

On entering bootloader mode the board will change COM port.

In the Arduino IDE, if you now go to menu bar and select Tools->Port and select COM36 and then try to upload oncemore.

MartinL:
On entering bootloader mode the board will change COM port.

In the Arduino IDE, if you now go to menu bar and select Tools->Port and select COM36 and then try to upload oncemore.

I gave it a try, with differents timings (since bootloader mode lasts only 5 seconds) but i'm still not able to upload a sketch. The most frustrating is to have to wait for IDE timeout (2 or 3 min) after each try...

Just tu be sure : i read about the .org/.cc story and since my M0 board is .org branded, is it supported by .cc IDE?

Just tu be sure : i read about the .org/.cc story and since my M0 board is .org branded, is it supported by .cc IDE?

Yes, the Arduino.org M0/M0 Pro boards were integrated into Arduino.cc IDE when the two companies merged back together. The Arduino M0 appears in the IDE's drop down list Tools->Boards.

MartinL:
Yes, the Arduino.org M0/M0 Pro boards were integrated into Arduino.cc IDE when the two companies merged back together. The Arduino M0 appears in the IDE's drop down list Tools->Boards.

Ok, so I can stop investigating in that way.

I'm still unable to upload sketches... and running out of ideas. Any kind of help would be very appreciated!

Hi Flockiewicz,

The Arduino M0/M0 Pro and the Arduino Zero despite being physically similar boards, use different bootloaders. In my experience the Arduino Zero's modified SAM-BA bootloader works really well. Sometimes it's necessary to put it into bootloader mode, but it's never failed to upload yet.

As an option of last resort, you could connect an Atmel-ICE programmer, (that plugs into the Arduino M0's 2x5 way SWD port) and then use the Arduino IDE to burn the Arduino Zero's bootloader.

After burning the bootloader you'd subsequently have to select the Arduino Zero as your board in the IDE. The only other difference would be that digital pins D2 and D4 would be reversed and you don't have an ATN pin that's available on the Zero. Other than that there's no difference.

MartinL:
As an option of last resort, you could connect an Atmel-ICE programmer, (that plugs into the Arduino M0's 2x5 way SWD port) and then use the Arduino IDE to burn the Arduino Zero's bootloader.

After burning the bootloader you'd subsequently have to select the Arduino Zero as your board in the IDE. The only other difference would be that digital pins D2 and D4 would be reversed and you don't have an ATN pin that's available on the Zero. Other than that there's no difference.

The problem is that i do not have an Atmel-ICE, otherwise I would have tried this solution.
As i'm not 100% sure that it will solve my problem, i won't invest another 100€ in this tool.

Is it possible to upload a sketch using RX/TX instead of USB port?

Hi Flockiewicz,

If you don't want to invest in an Atmel-ICE programmer, it might be worth checking to see if you have a local hackspace in your area. There might be someone there who'd be able to help, in order to recover you boards.

It's a shame that Atmel (now Microchip) has more than doubled the price of their ICE programmer. The Basic version cost only 40€ a couple of years ago.

I had the same problem a few months ago. In the end I did not need to reprogram my board, fully uninstalling the driver worked.

Follow my instructions in the end of the following thread.

https://forum.arduino.cc/index.php?topic=443677.msg3309591#msg3309591

Best of luck.

Scamb09

The "Burn Bootloader" control in the Arduino IDE works for me...