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

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

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
dconner
 
Posts: 24
Joined: Tue Aug 09, 2011 11:36 pm

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

Post by dconner »

I have a Feather M4 Express. I just installed the latest released version of CircuitPython on the board. I am working on a Chromebook and trying to check the UF2 bootloader for the correct version. I've tried to double-click the reset to view the bootloader (many times) and it does not work. All I get is CircuitPython disconnected and notified that a "removable device detected". The device is not recognized and it presents the option to format the device. I have not tried to format the device.

Any advice on how to proceed to check the bootloader?

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 »

@dconner It is possible the Chromebook is not recognizing the FEATHERBOOT drive. But how did you update CircuitPython, if double-click was not working? Did you copy the CircuitPython .uf2 file to CIRCUITPY, or to FEATHERBOOT? If you copied it to CIRCUITPY, then you have not really updated CircuitPython.

If you have access to any other machine, WIndows, Mac, or Linux, see if a double-click will present FEATHERBOOT.

FEATHERBOOT is a "fake" drive, so you cannot reformat it.

User avatar
dconner
 
Posts: 24
Joined: Tue Aug 09, 2011 11:36 pm

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

Post by dconner »

I got access to a Mac and checked the bootloader is v3.10 so it should be okay.

Initially when I plug in the M4 Express into the Chromebook the FEATHERBOOT drive is visible. After I drop the CircuitPython folder into FEATHERBOOT I never see FEATHERBOOT again on the Chromebook, even if I double-click the reset.

Thanks for the help.

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 »

Thanks for the testing. So are you saying after double-clicking, FEATHERBOOT does NOT appear on the Chromebook, but DOES appear on the Mac?

What brand and model of Chromebook is it?

Could you try this on the Chromebook? From the CircuitPython REPL:

Code: Select all

>>> import microcontroller
>>> microcontroller.on_next_reset(microcontroller.RunMode.BOOTLOADER)
>>> microcontroller.reset()
This should reset into the bootloader, without restarting CircuitPython. I would be interested in whether FEATHERBOOT then appears.

User avatar
dconner
 
Posts: 24
Joined: Tue Aug 09, 2011 11:36 pm

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

Post by dconner »

My Chromebook is an Acer Chromebook 14 CB3-431 MFG Date: 2017/12/07

When I run the 3 lines of code in the CircuitPython REPL then CIRCUITPY disappears from the directory. It appears to have the same effect as double-clicking the reset button.

While trying various resets with double-clicks I did see FEATHERBOOT appear in the directory for about one second and disappear. It may have been when double-clicking reset after a single click before CIRCUITPY showed up in the directory. I have not been able duplicate it and was not sure if those experiments were safe for the M4.

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 »

I have a new Chromebook on order for testing purposes and will try to replicate this problem. Thanks for the report.

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 »

@dconner: I received my Chromebook (Lenovo 82BA0000US), and was able to replicate the problem. What I see is that I can see the BOOT drive the first few times, but after several double-click cycles, the BOOT drive stop appearing. CIRCUITPY continues to appear.

I found that rebooting the Chromebook resets things. Also, it may help to deliberately unmount the CIRCUITPY drive before double-clicking to get the BOOT drive. See if that helps for you, and can be used as a workaround for now.

I will do some more testing later. It's fishy that the CIRCUITPY drive sometimes shows up with a sibling USB drive that is unreadable, underneath the board name. I have to click the ">" to point down to see both.

User avatar
dconner
 
Posts: 24
Joined: Tue Aug 09, 2011 11:36 pm

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

Post by dconner »

Rebooting my Chromebook and then double-clicking reset did make FEATHERBOOT appear. It seemed to take a long time (10-20 seconds) to appear the first time. It does seem to work more reliably when CIRCUITPY has been exited before double-clicking. I have tried it several times with success. Sometimes it doesn't seem work which may be due to variations in my double-clicking or some other reason.

It looks adequate to me as a workaround.

User avatar
abospam
 
Posts: 2
Joined: Sat Aug 15, 2020 9:33 pm

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

Post by abospam »

My Pybadge from 2019 may have hit this bug. Everything was working fine. I switched back and forth between Circuit Python and Aruduino, successfully many times. But, last when I was in Arduino mode, when I hit double reset I got all red neopixels and a black screen. The PYBADGEBOOT drive is not visible via USB on Windows 10. On the back side left LED is fast pulse yellow, right LED is
a few Hz pulse red. Arudino IDE also does not seem to see a serial port on either single or double reset. Any way to get back the bootloader?

User avatar
abospam
 
Posts: 2
Joined: Sat Aug 15, 2020 9:33 pm

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

Post by abospam »

Nevermind, rebooting Windows and re-starting Arduino IDE I was able to re-program the Pybadge. Bootloader now returns with double reset as expected.

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

Return to “Adafruit CircuitPython”