Hello everyone,
I am currently testing the secure bootloader over USB example but I am currently facing an issue when I start a DFU.
2022-03-25 12:13:23,456 Using board at serial port: COM24 2022-03-25 12:13:23,462 Sending Application image. 2022-03-25 12:13:26,970 Serial: Set Packet Receipt Notification 0 2022-03-25 12:13:26,970 SLIP: --> [2, 0, 0] Traceback (most recent call last): File "nordicsemi\dfu\dfu_transport_serial.py", line 123, in send_message File "site-packages\serial\serialwin32.py", line 323, in write serial.serialutil.SerialTimeoutException: Write timeout During handling of the above exception, another exception occurred: Traceback (most recent call last): File "nordicsemi\__main__.py", line 1537, in <module> File "site-packages\click\core.py", line 764, in __call__ File "site-packages\click\core.py", line 717, in main File "site-packages\click\core.py", line 1137, in invoke File "site-packages\click\core.py", line 1137, in invoke File "site-packages\click\core.py", line 956, in invoke File "site-packages\click\core.py", line 555, in invoke File "nordicsemi\__main__.py", line 1015, in usb_serial File "nordicsemi\__main__.py", line 972, in do_serial File "nordicsemi\dfu\dfu.py", line 127, in dfu_send_images File "nordicsemi\dfu\dfu.py", line 88, in _dfu_send_image File "nordicsemi\dfu\dfu_transport_serial.py", line 216, in open File "nordicsemi\dfu\dfu_transport_serial.py", line 359, in __set_prn File "nordicsemi\dfu\dfu_transport_serial.py", line 125, in send_message pc_ble_driver_py.exceptions.NordicSemiException: Writing to serial port failed: Write timeout. If MSD is enabled on the target device, try to disable it ref. https://wiki.segger.com/index.php?title=J-Link-OB_SAM3U
Here is my configuration:
- Hardware: nRF52840 DK (V0.9.0)
- nrf Util (6.1.0, exe)
- SDK 17.0.2
The dev kit is working fine with an other firmware using the USB CDC class example, I can communicate with the board.
I have tried to connect with a terminal but the COM is blocked. Trying to reset the board or the computer won't do anything.
Edit : I have also disabled the MSD, but the result was the same.
- Bootloader
I used the secure_bootloader_usb_mbr_pca10056_debug example with no modification. I just rebuilt it and renamed it.
- Generation of the bootloader settings
nrfutil settings generate --family NRF52840 --application nrf52840_myBootloaderUSB.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 bootloader_setting.hex
- Generation of the DFU package
nrfutil pkg generate --hw-version 52 --application-version 1 --application 04_blinky_mbr.hex --sd-req 0x0100 --key-file private.key DFU_Package.zip
- Flash
The bootloader, the bootloader settings and the softdevice (s140_nrf52_7.2.0_softdevice.hex) are flashed in the board.
- DFU
After having set the board in DFU mode (Button 4 + RESET), I use this command to start the DFU
nrfutil dfu usb-serial -pkg DFU_Package.zip -p COM24 -b 115200
Do you know what could be the cause of this problem ?
Best regards,
Alexandre