Closed Tiebe closed 1 year ago
Works for me on a fresh MDK. Maybe you need to erase the persistent storage, and the blinking is a panic. In that case, follow the instructions above again, but instead of flashing OpenSK, you install the example app that erases all storage. WARNING: Erases all existing credentials, in case you have any important ones.
./deploy.py --board=nrf52840_mdk_dfu --programmer=none --erase_storage
python3 uf2conv.py -c -f 0xada52840 -o target/opensk.uf2 target/nrf52840_mdk_dfu_merged.hex
Then copy and replug. Give it a few seconds to complete erasing the storage. Then try again with --opensk
instead of --erase_storage
:
./deploy.py --board=nrf52840_mdk_dfu --programmer=none --opensk
python3 uf2conv.py -c -f 0xada52840 -o target/opensk.uf2 target/nrf52840_mdk_dfu_merged.hex
Replug and please report back if that changes anything.
Would love to try this, but I can't even enter dfu mode, so I can't flash anything
Ah right, understood. Is this problem OpenSK related, because you can't enter DFU mode since you flashed an OpenSK, and it worked before?
That's correct
In that case, I'll have to understand how to reproduce. Please let me know if you have any pointers etc. about that.
I had the same problem. Flashing LED and unresponsive bootloader.
If you have a Raspberry Pi you can use OpenOCD to re-flash the UF2 bootloader.
I followed the instructions here https://www.rototron.info/circuitpython-nrf52840-dongle-openocd-pi-tutorial/
It is for the PCA10059 dongle but the process is the same. The only difference is the location of the SWDCLK and SWDIO pins. The pinout can be found here https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/#pinout-diagram
Heed the warnings about resetting the voltage regulator.
The latest 0.7.0 UF2 bootloader for the MDK is here: https://github.com/adafruit/Adafruit_nRF52_Bootloader/releases/download/0.7.0/mdk_nrf52840_dongle_bootloader-0.7.0_s140_6.1.1.hex
Only flash the bootloader and skip installing CircuitPython at the end.
OpenSK ran fine with the fresh bootloader.
Thanks for helping! Do you know if the unresponsive bootloader was caused by OpenSK? @chimpnz
Thanks for helping! Do you know if the unresponsive bootloader was caused by OpenSK? @chimpnz
Not really sure. I tried to reproduce it and can not. The MDK dongle that had the issue had CircuitPython and LOGItacker installed previously. I tried again loading both via UF2 and then OpenSK and the bootloader remains functional.
I tried another MDK dongle with the original bootloader (UF2 Bootloader 0.2.13-42-g82464f9-dirty) with CircuitPython/LOGItacker/OpenSK and bootloader works fine.
One odd thing is that CircuitPython will no longer run on either dongle. I can copy the UF2 file but it does not run after reset. Tried several versions. LOGItacker and OpenSK run fine.
Can you confirm which branch you're using? stable
or develop
?
The original issue is against stable
.
Considering the dongle has been used before, this is what may have happened:
UICR
NVM registers a specific way for their usageUICR
) are configured correctly codeUICR
values to put them in a known stateIn develop
branch we removed that part of the code to avoid such issue and we also have a patch to protect these 2 bootloader values.
But the develop
branch is not always tested with the MDK dongle so it might not work out of the box if we haven't properly kept the board configuration.
If you're using the stable
branch, we can try backporting the patch to see if this solves the issue.
I am using the stable branch.
I erased and flashed the UF2 bootloader. CircuitPython will load an run. After loading OpenSK, CircuitPython will no longer run.
Expected Behavior
Being able to use OpenSK after flashing
Actual Behavior
Led flashing light blue rapidly, cannot enter DFU mode by pressing the button while plugging in.
lsusb output:
dmesg output:
Steps to Reproduce the Problem
git clone https://github.com/google/OpenSK.git
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh
source $HOME/ .cargo/env
cd OpenSK
./setup.sh
./deploy.py --board=nrf52840_mdk_dfu --opensk --programmer=none
python3 uf2conv.py -c -f 0xada52840 -o target/opensk.uf2 target/nrf52840_mdk_dfu_merged.hex
Specifications