I'm making a PCB for a personal project using the STM32F205. In my plan, the STM32 only provides USB and SWD interface with the PC. I know that with the help of USB DFU, I can download my program to the system memory through USB.
My concern is whether the initial bootloader of the STM32 chip contains the DFU? I mean the bootloader in the STM32 chip I bought from the ST company. Because if not, I think there is no method to download the DFU bootloader into my board and I have to add another interface, like UART or SPI, to my design which is only used to download the DFU bootloader.
-
\$\begingroup\$ You mention already having SWD, that's typically the most flexible way to program these especially during development. \$\endgroup\$Chris Stratton– Chris Stratton2018年10月21日 02:13:12 +00:00Commented Oct 21, 2018 at 2:13
2 Answers 2
Does STM32 bootloader contains USB DFU?
Depends on the specific part. Refer to the part datasheet, or see AN2606 for a comprehensive overview.
For STM32F2 parts, it depends on the revision of the part. New parts (revisions X and Y) support USB DFU, but some older parts (revision B) do not.
-
\$\begingroup\$ This is what I was looking for. I still didn't find the most suitable way of entering in the boot mode. AFAIK the board has to have an external XTAL, then many options with Boot0,1 or some other conditions (I should read the document first). But, a short question: can I use BOOT0 pin as GPIO, so to use this GPIO as an application button. At the power on, pressing this button I would like to enter into boot mode. Is this possible? \$\endgroup\$Marko Buršič– Marko Buršič2021年04月13日 16:35:35 +00:00Commented Apr 13, 2021 at 16:35
During the development use SWD programmer/debugger.
I would suggest to write own bootloader as the built one is very simple and does not provide any app checks. It is especially important if your app controls something which can be damaged cause damage if the program is not correct.