nrf52840 Express Bootloader Update Fail

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
gregtronics
 
Posts: 1
Joined: Mon Feb 08, 2021 11:59 am

nrf52840 Express Bootloader Update Fail

Post by gregtronics »

Hello Everyone,

I went and checked with nRF52840 feather express and noticed the bootloader if fairly old (0.2.6) so I tried to use the adafruit-nrfutil.exe steps to update it. Mine fails on unzipping the zip file for the update. Any thoughts on this? I did go down the other path to build my own self contained and still had the same thing happen.
Attachments
2021-02-08 10_58_43-Administrator_ Command Prompt.png
2021-02-08 10_58_43-Administrator_ Command Prompt.png (15.84 KiB) Viewed 431 times

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: nrf52840 Express Bootloader Update Fail

Post by mikeysklar »

@gregtronics,

I took a look at the zip file and I think you need to unzip it once. Then you will find a usable .zip file which you can upload with or a UF2 file if you prefer that style of go into bootloader mode and drag and drop.

Code: Select all

$ unzip feather_nrf52832_bootloader-0.4.0.zip 
Archive:  feather_nrf52832_bootloader-0.4.0.zip
  inflating: feather_nrf52832_bootloader-0.4.0_s132_6.1.1.hex  
 extracting: feather_nrf52832_bootloader-0.4.0_s132_6.1.1.zip  
  inflating: update-feather_nrf52832_bootloader-0.4.0_nosd.uf2  

User avatar
2bndy5
 
Posts: 10
Joined: Mon Jun 24, 2019 10:11 pm

Re: nrf52840 Express Bootloader Update Fail

Post by 2bndy5 »

I need help with this too. I've tried both dragging-n-dropping the update-feather_nrf52840_express_bootloader-0.5.1_nosd.uf2 file and the board resets to the bootloader (no CIRCUITPY drive). I've also tried using the adafruit-nrfutil CLI program to flash the bootloader from the feather_nrf52840_express_bootloader-0.5.1_s140_6.1.1.zip file, but I get the same result.

I tried skipping the bootloader upgrade, and just upload the latest version of Circuitpython (v6.3.0). However, the uf2 file doesn't seem to finish copying before the board resets. After the reset I get a CIRCUITPY drive, but I cannot open the Serial port. This is happening on windows as well as Ubuntu (I tried both OS because the tutorial page mentions something about Windows having connection issues).

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: nrf52840 Express Bootloader Update Fail

Post by hathach »

2bndy5 wrote:I need help with this too. I've tried both dragging-n-dropping the update-feather_nrf52840_express_bootloader-0.5.1_nosd.uf2 file and the board resets to the bootloader (no CIRCUITPY drive). I've also tried using the adafruit-nrfutil CLI program to flash the bootloader from the feather_nrf52840_express_bootloader-0.5.1_s140_6.1.1.zip file, but I get the same result.

I tried skipping the bootloader upgrade, and just upload the latest version of Circuitpython (v6.3.0). However, the uf2 file doesn't seem to finish copying before the board resets. After the reset I get a CIRCUITPY drive, but I cannot open the Serial port. This is happening on windows as well as Ubuntu (I tried both OS because the tutorial page mentions something about Windows having connection issues).
You will need existing bootloader at least version 0.4.0 to perform self-update with uf2 file. The easiest way is using the Arduino IDE to burn the bootloader

https://github.com/adafruit/Adafruit_nR ... r-with-dfu

User avatar
2bndy5
 
Posts: 10
Joined: Mon Jun 24, 2019 10:11 pm

Re: nrf52840 Express Bootloader Update Fail

Post by 2bndy5 »

I seem to already have the 0.5.0 bootloader. though IIRC this was the version I tried to flash when I first recieved my feather nrf52 express
UF2 Bootloader 0.5.0 lib/nrfx (v2.0.0) lib/tinyusb (0.9.0-22-g7cdeed54) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
Model: Adafruit Feather nRF52840 Express
Board-ID: nRF52840-Feather-revD
SoftDevice: S140 version 6.1.1
Date: Apr 4 2021
I tried using the Arduino IDE (in windows) ,and it gave the same output that `adfruit-nrfutil` tool gives. Again after using the "Burn Bootloader" option in Arduino IDE (in windows), the board resets back into bootloader/DFU mode.
Upgrading target on COM10 with DFU package C:\Users\ytreh\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.22.1\bootloader\feather_nrf52840_express\feather_nrf52840_express_bootloader-0.5.0_s140_6.1.1.zip. Flow control is disabled, Dual bank, Touch 1200

Failed to upgrade target. Error is: Serial port could not be opened on COM10. Reason: Cannot configure port, something went wrong. Original message: OSError(22, 'The semaphore timeout period has expired.', None, 121)
Traceback (most recent call last):
File "dfu\dfu_transport_serial.py", line 99, in open
File "serial\serialwin32.py", line 33, in __init__
File "serial\serialutil.py", line 244, in __init__
File "serial\serialwin32.py", line 80, in open
File "serial\serialwin32.py", line 222, in _reconfigure_port
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: OSError(22, 'The semaphore timeout period has expired.', None, 121)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "__main__.py", line 296, in serial
File "dfu\dfu.py", line 226, in dfu_send_images
File "dfu\dfu.py", line 157, in _dfu_send_image
File "dfu\dfu_transport_serial.py", line 101, in open
nordicsemi.exceptions.NordicSemiException: Serial port could not be opened on COM10. Reason: Cannot configure port, something went wrong. Original message: OSError(22, 'The semaphore timeout period has expired.', None, 121)

Possible causes:
- Selected Bootloader version does not match the one on Bluefruit device.
Please upgrade the Bootloader or select correct version in Tools->Bootloader.
- Baud rate must be 115200, Flow control must be off.
- Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.
Worth noting that Arduino IDE also couldn't reset the board into bootloader mode; I had to do that manually.
Upgrading target on COM11 with DFU package C:\Users\ytreh\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.22.1\bootloader\feather_nrf52840_express\feather_nrf52840_express_bootloader-0.5.0_s140_6.1.1.zip. Flow control is disabled, Dual bank, Touch 1200
Touched serial port COM11
Opened serial port COM11
Starting DFU upgrade of type 3, SoftDevice size: 151016, bootloader size: 39000, application size: 0
Sending DFU start packet
Sending DFU init packet
Sending firmware file
########################################
########################################
########################################
########################################
########################################
########################################
########################################
########################################
########################################
############
Activating new firmware

Device programmed.
DFU upgrade took 20.85031747817993s
I will try the Arduino IDE's "Burn Bootloader" option in Ubuntu and see if that consequently helps Windows open the Serial port (when Circuitpython is running) afterward... then I'll post my results.

User avatar
2bndy5
 
Posts: 10
Joined: Mon Jun 24, 2019 10:11 pm

Re: nrf52840 Express Bootloader Update Fail

Post by 2bndy5 »

ok, I had to use adafruit-nrfutil in ubuntu because the Arduino IDE version I had installed (via `apt`) was limited to only the AVR boards...

Seems I was able to update the bootloader successfully:
UF2 Bootloader 0.5.1 lib/nrfx (v2.0.0) lib/tinyusb (0.9.0-22-g7cdeed54) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
Model: Adafruit Feather nRF52840 Express
Board-ID: nRF52840-Feather-revD
SoftDevice: S140 version 6.1.1
Date: Jun 2 2021
but I still can't open the Serial port on Windows to access the REPL; this seems to be not an issue with the bootloader nor Circuitpython, just with windows... BANNED

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: nrf52840 Express Bootloader Update Fail

Post by mikeysklar »

@2bndy5,

Good job getting the latest bootloader installed using adafruit-nrfutil via CLI.

I suspect you can update using the apt installed Ubuntu Arduino IDE, but you would need to install the appropriate Boards package Adafruit nRF52 as described here:

https://learn.adafruit.com/introducing- ... -bsp-setup

One Windows there are a variety of tools to open the serial console to access the REPL. Which utility were you using? We recommend Putty, but Mu should also work.

https://learn.adafruit.com/welcome-to-c ... on-windows

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: nrf52840 Express Bootloader Update Fail

Post by hathach »

2bndy5 wrote:ok, I had to use adafruit-nrfutil in ubuntu because the Arduino IDE version I had installed (via `apt`) was limited to only the AVR boards...

Seems I was able to update the bootloader successfully:
UF2 Bootloader 0.5.1 lib/nrfx (v2.0.0) lib/tinyusb (0.9.0-22-g7cdeed54) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
Model: Adafruit Feather nRF52840 Express
Board-ID: nRF52840-Feather-revD
SoftDevice: S140 version 6.1.1
Date: Jun 2 2021
but I still can't open the Serial port on Windows to access the REPL; this seems to be not an issue with the bootloader nor Circuitpython, just with windows... BANNED
which windows version you are on 7 or 10. Maybe it lacks the driver, you could check with the device manager. If it is the case, just download and install adafruit driver it should set everything up.

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

Return to “Feather - Adafruit's lightweight platform”