← index #5693Issue #4606
Related · high · value 2.289
QUERY · ISSUE

[mboot] It will stay in the dfu mode forever and not reset

openby rolandvsopened 2020-02-24updated 2025-11-09
port-stm32needs-info

When using mboot to replace the code with dfu commands all works fine. However, mboot stays in dfu mode and not resetting the device. This is tested using mboot with the H743.

CANDIDATE · ISSUE

Unable to get mboot to work on PYBV11 (or PYBV10)

closedby dhylandsopened 2019-03-14updated 2019-03-15
port-stm32

I'm just trying to reproduce using mboot on the PYBV11. I was using the latest master c9eb7eb449a246c607fa92a5313e3137d728fbcb

I started by doing a regular micropython build:

cd ports/stm32
make BOARD=PYBV11 clean all deploy

which brought up Micropython fine.

I then put the board in DFU mode and built and flashed mboot

cd ports/stm32/mboot
make BOARD=PYBV11 clean all deploy

I used the USR switch to get mboot into mboot mode (red LED flashing) and dfu-util -l shows:

683 >dfu-util -l
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Found DFU: [0483:df11] ver=2200, devnum=30, cfg=1, intf=0, alt=0, name="@Internal Flash  /0x08000000/04*016Kg,01*064Kg,07*128Kg", serial="336F338F3433"

I then went back to the stm32 directory and build micropython for mboot:

cd ports/stm32
make BOARD=PYBV11 USE_MBOOT=1 clean all deploy

The flashing built a single segment image and it seemed to flash ok:

Writing build-PYBV11/firmware.dfu to the board
File: build-PYBV11/firmware.dfu
    b'DfuSe' v1, image size: 333373, targets: 1
    b'Target' 0, alt setting: 0, name: "ST...", size: 333088, elements: 1
      0, address: 0x08020000, size: 333080
    usb: 0483:df11, device: 0x0000, dfu: 0x011a, b'UFD', 16, 0x687e6871
Writing memory...
0x08020000  333080 [=========================] 100% 
Exiting DFU...

However, when I reset the board, I just get the 3 dimly lit LEDs. Pushing the USR button gets me back into DFU mode.

Before investigating further, I wanted to make sure that I'm not missing a step.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied