usb/class/dfu: void wait_for_usb_dfu() terminates before DFU operation is completed #29611
Labels
area: USB
Universal Serial Bus
bug
The issue is a bug, or the PR is fixing a bug
priority: medium
Medium impact/importance bug
Describe the bug
After new firmware have been download via USB is completed wait_for_usb_dfu() terminated so fast that dfu_work_handler() was not called by k_work_queue.
If application resets closely after wait_for_usb_dfu() call returned, DFU operation will be not completed.
This is the case while using along with MCUBoot.
To Reproduce
west build -d build/mcuboot -b nrf52840dk_nrf52840 bootloader/mcuboot/boot/zephyr/ -t menuconfi -- -DDTC_OVERLAY_FILE=./boards/nrf52840_single_slot.overlay
ensue
BOOT_WAIT_FOR_USB_DFU=y
west build -d build/mcuboot
west build -d build/hellow -b nrf52840dk_nrf52840 zephyr/samples/hello_world/ -- -DDTC_OVERLAY_FILE=/home/anpu/codedev/zephyrproject/bootloader/mcuboot/boot/zephyr/boards/nrf52840_single_slot.overlay
ensure ensue
BOOTLOADER_MCUBOOT=y
west build -d build/hellow
west sign -d build/hellow/ -t imgtool -- --key bootloader/mcuboot/root-rsa-2048.pem
west flash -d build/mcuboot
sudo dfu-util --alt 0 --download ./build/hellow/zephyr/zephyr.signed.bin
Mcuboot Log:
Expected behavior
wait_for_usb_dfu() should terminate after DFU operation was completed
zephyr-rtos 28.10.2020 5374245
The text was updated successfully, but these errors were encountered: