Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.

Dead M4 Express
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Dead M4 Express

by bklass on Thu Jan 10, 2019 11:48 am

turbinenreiter wrote:I had to re-flash the bootloader using a j-link, and now it works again with the double-click and drive.

The list with the codeblocks a couple of posts up is a little how-to - but you need a segger j-link and some time. I think the instructions are complete, but there is a lot of implicit stuff ... so if you have a j-link and want to try, I'll be here and try to help.

I have a feather M0. I also have a j-link. the feather doesn't respond to anything and I was very happy to see someone figured out how to get the bootloader back on. I know this is an old post, but i've been trying to figure this thing out. I'm not sure what make is, or how to get it, or if it's a think that can be got. Is there a way you could explain a bit more and give a step by step? It's a big ask, but I hope you can help.


Posts: 5
Joined: Wed Jan 09, 2019 4:43 pm

Re: Dead M4 Express

by onnimikki on Mon Jan 14, 2019 10:25 am

And if we want to remove the bootloader entirely? Is it straightforward to do so using the Jlink utility?



Posts: 5
Joined: Mon Dec 22, 2014 9:21 pm

Re: Dead M4 Express

by benczech212 on Thu Feb 07, 2019 11:39 pm

Thank you so much for this post!

I purchased a feather M4 a few months ago.
I quickly began trying my new board out on my existing sketches to see how it compared to my Feather M0 Express (amazingly by the way - it runs laps around neopixel math). I was quickly in love.
I had been happily using my Feather M4 for a little over a week - until the faithful day. I uploaded a new draft of my latest sketch - the usual routine. After uploading successfully, the board became unresponsive in a state where the yellow led was blinking quickly.

I tried all the regular troubleshooting including double tapping the reset button - but nothing seemed to get it out of this state. It dawned on me that my new code must have bricked my beloved board. :(

A few weeks later, I purchased another Feather M4. As always, I decided to test the unit via usb before adding some slick stacking header pins. Unfortunately though, the board booted up displaying the same symptoms as my other seemingly bricked board. It was unresponsive - blinking yellow and unable to get into the bootloader on double tab of the reset button.

My friend encouraged me to try using a programmer to flash a new bootloader onto the board. Fortunately I was able to borrow an Atmel-Ice programmer from my place of work (score!).

So I soldered a short length of wire to the SWDIO & SWCLK pads on the bottom of the board.
Attached the SWDIO and SWCLK leads to some alligator clips with pins on the other end (thank you AdaBox006!)
The Atmel-Ice comes with a 100-mil 10-pin JTAG/SWD adapter that's gives you access to the 10 SWD pins on the programmer in the form of female pinned wires of the same type as the pinned alligator clips and other pinned wire jumpers that I have.

I found this pinout in the manual (page 29)

Since this is a SAMD21 microprocessor, I plugged the SWD connector into the SAM port instead of the AVR port. This was my pinout
SWDCLK Clock - Pin 4
SWDIO Data - Pin 2
SWO (not used) - Pin 6
nSRST Reset - Pin 10 (marked as 0)
VTG Volt Reference - Pin 1
GND Ground - Pins 3, 5, and 9 (I used a breadboard to help connect this one)

I loaded up Atmel studio. Under the device programming menu (ctrl + shift + p), I chose my tool Atmel-Ice, device ATSAMD51J19A and interface SWD, I then attempted to read the device signature. Success!

I then checked for the latest bootloader from the Adafruit repo here:
I chose the .bin file for my board (as of now bootloader-feather_m4-v2.0.0-adafruit.9.bin)

Back to atmel studio under the memories tab of the device programming menu - I choose the bin file downloaded from the repo. I then hit program and BAM!

Adafruit-FeatherM4-BootloaderFlashInAtmel.PNG (32.5 KiB) Viewed 158 times


My feather's neopixel then came on green and the red light began fading up and down and windows detected the feather-boot storage device. Huzzaa!

Now, I'm happy to report all is working as expected! And that was surprisingly easy!

Resurrection successful!

Thank you for the guidance on this :)

Posts: 9
Joined: Mon Dec 11, 2017 7:18 am

Re: Dead M4 Express

by MakerMelissa on Thu Feb 07, 2019 11:45 pm

Thanks for adding to this topic benczech212. :) Now I feel silly for compiling the bootloader from source when they were already there all the time under releases.

Posts: 155
Joined: Wed Jun 05, 2013 2:10 am

Re: Dead M4 Express

by adafruit2 on Fri Feb 08, 2019 1:39 am

we have a guide here for people to follow ... ootloaders

Site Admin
Posts: 19277
Joined: Fri Mar 11, 2005 7:36 pm

Please be positive and constructive with your questions and comments.