8000 stm32/README: Reorg DFU flashing instructions with addition for PYBD. · webduino-cn/micropython@f385b7b · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit f385b7b

Browse files
tvedpgeorge
authored andcommitted
stm32/README: Reorg DFU flashing instructions with addition for PYBD.
1 parent ab4e197 commit f385b7b

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

ports/stm32/README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,31 @@ The default board is PYBV10 but any of the names of the subdirectories in the
5353
should produce binary images in the `build-PYBV11/` subdirectory (or the
5454
equivalent directory for the board specified).
5555

56-
You must then get your board/microcontroller into DFU mode. On the pyboard
57-
connect the 3V3 pin to the P1/DFU pin with a wire (they are next to each
58-
other on the bottom left of the board, second row from the bottom) and then
59-
reset (by pressing the RST button) or power on the board. Then flash the
60-
firmware using the command:
56+
57+
### Flashing the Firmware using DFU mode
58+
59+
You must then get your board/microcontroller into DFU (Device Firmware
60+
Update) mode.
61+
62+
If you already have MicroPython installed on the board you can do that by
63+
calling `machine.bootloader()` on the board, either at the REPL or using
64+
`pyboard.py`. A nice property of this approach is that you can automate it
65+
so you can update the board without manually pressing any buttons.
66+
67+
If you do not have MicroPython running yet, temporarily jumper your board's
68+
DFU pin (typ. BOOT0) to 3.3v and reset or power-on the board.
69+
70+
On a pyboard the P1/DFU pin and a 3.3v pin are next to each other (on the
71+
bottom left of the board, second row from the bottom) and the reset button
72+
is labeled RST.
73+
74+
For the pyboard D-series you can enter the mboot DFU bootloader by holding down
75+
the USR button, pressing and releasing the RST button, and continuing to hold
76+
down USR until the LED is white (4th in the cycle), then let go of USR while
77+
the LED is white. The LED will then flash red once per second to indicate it
78+
is in USB DFU mode.
79+
80+
Once the board is in DFU mode, flash the firmware using the command:
6181

6282
$ make BOARD=PYBV11 deploy
6383

0 commit comments

Comments
 (0)
0