ADAFRUIT BLUEFRUIT FEATHER NRF52840: CANT FLASH BOOTLOADER

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
matead
 
Posts: 9
Joined: Tue Oct 26, 2021 12:31 am

ADAFRUIT BLUEFRUIT FEATHER NRF52840: CANT FLASH BOOTLOADER

Post by matead »

Hi. I have an Adafruit Feather nRF52840, and I have tried to upload one of the examples but whenever I try to do so, I get this error

Code: Select all

C:\Users\Matt\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.1.0/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe --verbose dfu serial -pkg C:\Users\Matt\AppData\Local\Temp\arduino_build_4974/central_scan.ino.zip -p COM8 -b 115200 --singlebank 
Upgrading target on COM8 with DFU package C:\Users\Matt\AppData\Local\Temp\arduino_build_4974\central_scan.ino.zip. Flow control is disabled, Single bank, Touch disabled
Opened serial port COM8
Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 66292
Sending DFU start packet
Sending DFU init packet
Sending firmware file

Failed to upgrade target. Error is: WriteFile failed (PermissionError(13, 'The device does not recognize the command.', None, 22))
Traceback (most recent call last):
  File "__main__.py", line 296, in serial
  File "dfu\dfu.py", line 235, in dfu_send_images
  File "dfu\dfu.py", line 206, in _dfu_send_image
  File "dfu\dfu_transport_serial.py", line 213, in send_firmware
  File "dfu\dfu_transport_serial.py", line 241, in send_packet
  File "serial\serialwin32.py", line 317, in write
serial.serialutil.SerialException: WriteFile failed (PermissionError(13, 'The device does not recognize the command.', None, 22))

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.
I then try to update the bootloader, but I get this error

Code: Select all

C:\Users\Matt\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.1.0/bootloader/feather_nrf52832/feather_nrf52832_bootloader-0.6.2_s132_6.1.1.zip -p COM8 -b 115200 --touch 1200 
Upgrading target on COM8 with DFU package C:\Users\Matt\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.1.0\bootloader\feather_nrf52832\feather_nrf52832_bootloader-0.6.2_s132_6.1.1.zip. Flow control is disabled, Dual bank, Touch 1200
Touched serial port COM8
Opened serial port COM8
Starting DFU upgrade of type 3, SoftDevice size: 147792, bootloader size: 21704, application size: 0
Sending DFU start packet
Sending DFU init packet
Sending firmware file

Failed to upgrade target. Error is: WriteFile failed (PermissionError(13, 'The device does not recognize the command.', None, 22))
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 206, in _dfu_send_image
  File "dfu\dfu_transport_serial.py", line 213, in send_firmware
  File "dfu\dfu_transport_serial.py", line 241, in send_packet
  File "serial\serialwin32.py", line 317, in write
serial.serialutil.SerialException: WriteFile failed (PermissionError(13, 'The device does not recognize the command.', None, 22))

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.
What the hell is going on? I'm using Windows 10 (64-bit) with the latest Adafruit libraries that the Arduino IDE had listed.

Thanks.

User avatar
matead
 
Posts: 9
Joined: Tue Oct 26, 2021 12:31 am

Re: ADAFRUIT BLUEFRUIT FEATHER NRF52840: CANT FLASH BOOTLOAD

Post by matead »

Okay, after hours of troubleshooting, I managed to update the bootloader by using "feather_nrf52840_express_bootloader-0.6.2.zip" from your GitHub and using the ZIP within it with "adafruit-nrfutil.exe".

So that's updated now to
  • UF2 Bootloader 0.6.2 lib/nrfx (v2.0.0) lib/tinyusb (0.10.1-293-gaf8e5a90) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
    Model: Adafruit Feather nRF52840 Express
    Board-ID: nRF52840-Feather-revD
    SoftDevice: S140 version 6.1.1
    Date: Sep 10 2021
However, I still cannot upload the Arduino examples. I am getting this error.

Code: Select all

C:\Users\Matt\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.1.0/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe --verbose dfu serial -pkg C:\Users\Matt\AppData\Local\Temp\arduino_build_314717/central_scan.ino.zip -p COM8 -b 115200 --singlebank 
Upgrading target on COM8 with DFU package C:\Users\Matt\AppData\Local\Temp\arduino_build_314717\central_scan.ino.zip. Flow control is disabled, Single bank, Touch disabled
Opened serial port COM8
Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 66292
Sending DFU start packet
Sending DFU init packet

Failed to upgrade target. Error is: ClearCommError failed (PermissionError(13, 'The device does not recognize the command.', None, 22))
Traceback (most recent call last):
  File "__main__.py", line 296, in serial
  File "dfu\dfu.py", line 235, in dfu_send_images
  File "dfu\dfu.py", line 203, in _dfu_send_image
  File "dfu\dfu_transport_serial.py", line 155, in send_init_packet
  File "dfu\dfu_transport_serial.py", line 243, in send_packet
  File "dfu\dfu_transport_serial.py", line 264, in get_ack_nr
  File "serial\serialwin32.py", line 275, in read
serial.serialutil.SerialException: ClearCommError failed (PermissionError(13, 'The device does not recognize the command.', None, 22))

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.

User avatar
matead
 
Posts: 9
Joined: Tue Oct 26, 2021 12:31 am

Re: ADAFRUIT BLUEFRUIT FEATHER NRF52840: CANT FLASH BOOTLOAD

Post by matead »

Okay, I had the wrong board selected it seems from the Arduino menu. Seems to be working now. Hope this helps anyone else who runs into this problem.

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

Return to “Microcontrollers”