Generate bootloader package file using adafruit_nrfutil from Adafruit nRF52 Bootloader hex file without SoftDevice.
Update bootloader using adafruit_nrfutil, but it failed.
Environments:
OS: Windows 10 Pro 1903
Board: PCA10056 (nRF52840 D/K made by Nordic Semiconductor)
adafruit-nrfutil: version 0.5.3.post12 (commit version) (use python 3.8 to generate exe file)
Bootloader used: Adafruit_nRF52_Bootloader master v0.3.2Shell: windows powershell (Runs as Administrator)
The log for generating bootloader dfu package:
PS D:\SW\E2\Debug\DFU> .\adafruit-nrfutil.exe dfu genpkg --dev-type 0x0052 --bootloader .\pca10056_bootloader-0.3.0-8-g3666e69-dirty-nosd.hex .\pca10056_bootloader-0.3.0-8-g3666e69-dirty-nosd.zip
Zip created at .\pca10056_bootloader-0.3.0-8-g3666e69-dirty-nosd.zip
The log for updating bootloader:
PS D:\SW\E2\Debug\DFU> .\adafruit-nrfutil.exe --verbose dfu serial -p COM13 -b 115200 --singlebank -pkg .\pca10056_bootloader-0.3.0-8-g3666e69-dirty-nosd.zip --touch 1200
Upgrading target on COM13 with DFU package D:\SW\E2\Debug\DFU\pca10056_bootloader-0.3.0-8-g3666e69-dirty-nosd.zip. Flow control is disabled, Single bank, Touch 1200
Touched serial port COM13
Opened serial port COM13
Starting DFU upgrade of type 2, SoftDevice size: 0, bootloader size: 30144, 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 "nordicsemi\__main__.py", line 294, in serial
File "nordicsemi\dfu\dfu.py", line 232, in dfu_send_images
File "nordicsemi\dfu\dfu.py", line 206, in _dfu_send_image
File "nordicsemi\dfu\dfu_transport_serial.py", line 213, in send_firmware
File "nordicsemi\dfu\dfu_transport_serial.py", line 241, in send_packet
File "site-packages\serial\serialwin32.py", line 315, 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.
USB Raw data:PC -> Board:
START PACKET: (0xDBDC might be the replacement of 0xC0)
C0 D1 4E 01 E0 03 00 00 00 02 00 00 00 00 00 00 00 DB DC 75 00 00 00 00 00 00 47 99 C0
INIT PACKET:
C0 DA 4E 01 D7 01 00 00 00 52 00 FF FF FF FF FF FF 01 00 FE FF 3D 28 00 00 9F 2A C0
Problem description:
Operations:
Environments:
OS: Windows 10 Pro 1903 Board: PCA10056 (nRF52840 D/K made by Nordic Semiconductor) adafruit-nrfutil: version 0.5.3.post12 (commit version) (use python 3.8 to generate exe file) Bootloader used: Adafruit_nRF52_Bootloader master v0.3.2 Shell: windows powershell (Runs as Administrator)
The log for generating bootloader dfu package:
The log for updating bootloader:
USB Raw data: PC -> Board:
Board -> PC: