SAMD51 (M4) board users: update your bootloaders to >=v3.9.0

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

SAMD51 (M4) board users: update your bootloaders to >=v3.9.0

Post by danhalbert »

If you have a SAMD51 board, including Metro M4, Feather M4, ItsyBitsy M4, Grand Central M4, Hallowing M4, PyBadge, PyGamer, PyPortal, or MONSTER M4SK, we highly recommend that you update the bootloader on your board to prevent internal flash occasionally being overwritten on power up.

For most boards this may just overwrite the loaded user program, but for a small number of boards that were shipped early in the product cycle, their bootloaders are not protected from overwriting, so this bug may brick the board, and require rewriting the bootloader manually, which can be difficult without external equipment or software.

There are directions for updating the bootloader in the primary product Learn Guide for each board, such as:
https://learn.adafruit.com/adafruit-fea ... bootloader
https://learn.adafruit.com/adafruit-pyg ... bootloader
https://learn.adafruit.com/adafruit-pyp ... bootloader
https://learn.adafruit.com/adafruit-pyb ... bootloader
etc.

User avatar
ProtoPix
 
Posts: 57
Joined: Sun Sep 11, 2016 6:49 pm

Re: SAMD51 (M4) board users: update your bootloaders to >=v3

Post by ProtoPix »

I've tried updating my bootloader on a Feather M4 Express with both the 5.3 and the 5.4.0 beta versions and both do not seem to update to the expected version based on contents of the INFO_UF2.TXT file. Below is the contents of that file for both versions.

Code: Select all

UF2 Bootloader v2.0.0-adafruit.7 SFHWRO
Model: Feather M4 Express
Board-ID: SAMD51J19A-FeatherM4-v0

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: SAMD51 (M4) board users: update your bootloaders to >=v3

Post by danhalbert »

ProtoPix wrote:I've tried updating my bootloader on a Feather M4 Express with both the 5.3 and the 5.4.0 beta versions ...
Hi, those version numbers are for CircuitPython. CircuitPython is not the bootloader, so updating CircuitPython will not change the version in INFO_UF2.TXT.

The bootloader lives in a small part of flash, and programs like CircuitPython (or any Arduino program) live in a different part of external flash.

To update the bootloader, you need to follow the directions here:
https://learn.adafruit.com/adafruit-fea ... bootloader

After you update the bootloader, you will need to reload CircuitPython, because it is overwritten by the update-bootloader .uf2 file.

User avatar
aklitman
 
Posts: 8
Joined: Fri Nov 11, 2011 9:08 am

Re: SAMD51 (M4) board users: update your bootloaders to >=v3

Post by aklitman »

After suffering a recto cranial inversion on updating my Grand Central M4's and figuring out how to do it right, I turned to my only Feather M4 and managed to brick it by loading the Grand Central UF2 into a Feather. I know, I know - I got what I deserved. Now, the Feather M4 won't come up at all. No drive or serial port regardless of reset presses. Is there a way to reload a correct bootloader? I think I saw a post about the Segger J unit but can't find it now. I have a Segger and would like to try reloading my Feather M4 Express if someone can point me to the instructions. Thx - Austin

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: SAMD51 (M4) board users: update your bootloaders to >=v3

Post by danhalbert »

Check out this guide: https://learn.adafruit.com/how-to-progr ... ootloaders. It uses Atmel Studio on Windows. I am going to work up a way to do it with just basic JLink softwre, but haven't had time yet.

User avatar
jetforme
 
Posts: 107
Joined: Mon Jul 15, 2013 6:26 pm

Re: SAMD51 (M4) board users: update your bootloaders to >=v3

Post by jetforme »

It seems the fix I opened a PR for (https://github.com/microsoft/uf2-samdx1/pull/89) has not been reviewed by MS, and so I guess you guys haven't seen it either.

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: SAMD51 (M4) board users: update your bootloaders to >=v3

Post by danhalbert »

@jetforme I answered you in that issue. We work closely with Microsoft on uf2 and try to stay in sync.

User avatar
Steve_3000
 
Posts: 48
Joined: Wed Oct 10, 2018 2:39 pm

Re: SAMD51 (M4) board users: update your bootloaders to >=v3

Post by Steve_3000 »

Attempting to follow this thread but confused.

I bricked my Feather M4 Express. No drive appears at all regardless of single or double tapping the reset button. No red or green LED, only the rapidly blinking tiny amber LED.

I inadvertently dragged the wrong file over: "update-bootloader-pyportal_m4-v3.10.0.uf2; rather than" update-bootloader-feather_m4-v3.10.0.uf2". Also, I may have pulled the micro USB plug too early. Mistakes are sooo instructive. :-)

Is there a way I can restore the Feather M4 Express? Do I need a J-link hardware thing? and/or Atmel Studio, which only runs on Windows?[1] and/or a terminal app called Bossa?

Thanks for any possible instructions.

[1] I have a Mac and a Raspberry Pi, but no Windows machine.

User avatar
dwzimmerli
 
Posts: 4
Joined: Thu Apr 19, 2018 1:52 pm

Re: SAMD51 (M4) board users: update your bootloaders to >=v3

Post by dwzimmerli »

I attempted to follow the update instructions in the Essentials Tutorial, but failed when I got to the point of Opening the INFO_UF2.TXT file in the file explorer browser. It pops up on the screen, but when I try to open the file, it just s[ins the wheel It is the same either using a double-click or a right click. The only way out is to disconnect the board or restart the computer. Any suggestions?

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: SAMD51 (M4) board users: update your bootloaders to >=v3

Post by danhalbert »

@dwzimmerli This may be due to an anti-virus or disk-utility program on your Windows machine (it sounds like you have Windows). Do you have another Windows machine to try, or a Raspberry Pi or Mac or Linux box?

User avatar
User_UMjT7KxnxP8YN8
 
Posts: 323
Joined: Tue Jul 17, 2018 1:28 pm

Re: SAMD51 (M4) board users: update your bootloaders to >=v3

Post by User_UMjT7KxnxP8YN8 »

My Feather M4 Express erased its firmware during testing with a lithium battery today. I loaded my firmware, tested and cycled power two or three times (I'm working on a QWERTY keyboard project, and cycled power using its built-in switch). The last time it failed to start up.

It's currently running this version of the bootloader:

Code: Select all

UF2 Bootloader v3.10.0 SFHWRO
Model: Feather M4 Express
Board-ID: SAMD51J19A-FeatherM4-v0
Thought you might want to know that this still happens sometimes, at least on the Feather M4 Express.

Unfortunately I don't have this board wired for debugging, or I would've poked around in memory to verify that's what happened. I reloaded my firmware and it works fine, so the board is ok.

Perhaps the original fix needs a tweak for running on battery power?

User avatar
pateco
 
Posts: 9
Joined: Mon Oct 11, 2021 11:19 pm

Re: SAMD51 (M4) board users: update your bootloaders to >=v3

Post by pateco »

Where can I find a guide on manually uploading the bootloader? I double-clicked the boot button on a Feather M4 CAN and it showed a drive, but after unplugging and replugging it back in, it no longer shows up. Double-clicking now shows a red light on the pixel.

This was the contents of the INFO_UF2.txt file

Code: Select all

UF2 Bootloader v1.23.1-adafruit.1-336-gbcaa5b1-dirty SFHWRO
Model: Feather M4 CAN Express
Board-ID: SAME51J19A-FeatherM4-v0
I have a j-link to flash if that's what's needed, but I'm not sure where to find the bootloader to flash.

Also, would I be flashing the circuit python bootloader if I intended to use arduino, or is there another version I should look for?

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: SAMD51 (M4) board users: update your bootloaders to >=v3

Post by danhalbert »

You can use the the files with "feather_m4_can" from here: https://github.com/adafruit/uf2-samdx1/ ... ag/v3.13.0

Which update .uf2 did you use?

Here's a guide to loading the bootloader manually, using Atmel Studio. It's also possible to do it with the command line J-Link utilities or JFlashLite, but you have to fiddle with the fuse bits, and we haven't written that up yet.

The UF2 bootloader works with both CircuitPython (and any other UF2) files and also can be used with Arduino. It supports both methods of uploading.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”