adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4.02k stars 1.19k forks source link

nordic: RunMode.UF2 stopped working in 9.1.0-beta.4 and later #9423

Open dhalbert opened 1 month ago

dhalbert commented 1 month ago

CircuitPython version

9.1.0-beta.4 and 9.1.0

Code/REPL

import microcontroller
microcontroller.on_next_reset(microcontroller.RunMode.UF2)
microcontroller.reset()

Behavior

Goes back to CircuitPython instead of bootloader

Description

No response

Additional information

Works in 9.10-beta.3.

Need to look at PR's and see if it's nRF-specific.

Discord: https://discord.com/channels/327254708534116352/537365702651150357/1260986985208610947

jeffsf commented 1 month ago

Discovered on Adafruit CircuitPython 9.1.0 on 2024-07-10; nice!nano with nRF52840

UF2 Bootloader 0.8.3 lib/nrfx (v2.0.0) lib/tinyusb (0.12.0-145-g9775e7691) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
Model: nice!nano
Board-ID: nRF52840-nicenano
Date: Jan 29 2024
SoftDevice: S140 6.1.1
dhalbert commented 1 month ago

I thought this might be due to https://github.com/adafruit/circuitpython/pull/9160, but that was in 9.1.0-beta.1.

EDIT: might be a combination of https://github.com/adafruit/circuitpython/pull/9160 and https://github.com/adafruit/circuitpython/pull/9344. https://github.com/adafruit/circuitpython/pull/9344 was added in beta.4

Does not fail on a Metro RP2040 on 9.1.0, so I think this is nordic-specific

dhalbert commented 1 week ago

This works again, probably fixed by #9453.

dhalbert commented 1 week ago

I just saw #9584, and I can't get it to work again. I thought I just tested on a Feather nRF52840, but it indeed goes back to CircuitPython. Saw same thing on Itsy nRF52840. On the chance it might be the bootloader, I tried with 0.9.3, 0.8.2., and 0.6.1, but they all go to CIRCUITPY.

dhalbert commented 1 week ago

@jordan1110 watch this issue, which is the same as your #9584.