DFU bootloader has errors on new BlackPill F411

Post here first, or if you can't find a relevant section!
ag123
Posts: 1656
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: DFU bootloader has errors on new BlackPill F411

Post by ag123 »

i'd guess u'd need to built it from source
the reason is that the PLL setups are intended for a different crystal, u'd need to edit those M, N, P, Q clock multipliers and rebuild.
https://github.com/Serasidis/STM32_HID_ ... ain.c#L245

those multipliers could be found in the variant files, or you could try a python script like this
viewtopic.php?f=41&t=78

note i found another one from weact
https://github.com/WeActTC/WeAct_HID_Bootloader_F4x1

edit:
ok i tried a build, i used my python script link above FHSE is defined as 25 mhz

Code: Select all

FHSE: 25 m: 25 n: 192 p: 2 (RCC_PLLP_DIV2) q: 4 fusb: 48.0 fcpu: 96.0 << this is the entry used
FHSE: 25 m: 25 n: 384 p: 4 (RCC_PLLP_DIV4) q: 8 fusb: 48.0 fcpu: 96.0
FHSE: 25 m: 25 n: 432 p: 4 (RCC_PLLP_DIV4) q: 9 fusb: 48.0 fcpu: 108.0
FHSE: 25 m: 50 n: 384 p: 2 (RCC_PLLP_DIV2) q: 4 fusb: 48.0 fcpu: 96.0
oops i built from an 'incorrect' source
https://github.com/WeActTC/STM32_HID_Bootloader
^ note as i build from this one, I noted some strange looking codes that i'm not sure what it is trying to do
https://github.com/WeActTC/STM32_HID_Bo ... 4fd5e3R146
but weact did change some pin definitions as well
the pll multipliers are edited as above, not the weact ones

i've not tried it, i don't have a stm32f411 board
hid_bootloader.zip
hid_bootloader.bin
(10.16 KiB) Downloaded 219 times
Last edited by ag123 on Mon Aug 30, 2021 1:39 pm, edited 4 times in total.
david.prentice
Posts: 19
Joined: Thu May 14, 2020 8:39 pm
Answers: 1

Re: DFU bootloader has errors on new BlackPill F411

Post by david.prentice »

And has no one done this yet ?

Surely if the STM32 IDE has "HID 2.2" as an official option for F4 targets, someone, somewhere has built the .BIN file.

In much the same way that there is a hid_generic_pc13.bin available for installing on a BluePill.
And lots of public videos, advice ... on how to install on a BluePill.

I can't believe that BlackPills have been on the market for about 2 years and that no one has built the hid_bootloader.bin file.
Or if they have, they don't say whether it works or not.

Googling for information about BlackPill Arduino uploads all seems to say ST-LINK or power-on RESET+BOOT0.
Yes, SWD works fine. Yes, DFU works with a 1% accurate HSI. Both involve external access to the BlackPill.

David.
david.prentice
Posts: 19
Joined: Thu May 14, 2020 8:39 pm
Answers: 1

Re: DFU bootloader has errors on new BlackPill F411

Post by david.prentice »

That hid_bootloader.bin does not do anything.

It does not matter if you don't have a F411. You can build for both F401 and F411.
But I presume that you should build from https://github.com/Serasidis/STM32_HID_Bootloader and not from WeActTC

As far as I can see WeAct don't support HID 2.2 and apparently look for HID with a non-existent VID/PID

I require a HID 2.2 bootloader that corresponds to the VID/PID requested by the Arduino IDE.

As I said earlier. It is painless with the BluePill-F103

David.
ag123
Posts: 1656
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: DFU bootloader has errors on new BlackPill F411

Post by ag123 »

ok i'd try a built from the original one, it seemed i'd need to update some pins e.g. boot1 to make this work
oops i'm running into various issues, the build completes with a binary. but i tried to 'blink' the led from within bootloader codes, it didn't.
Last edited by ag123 on Mon Aug 30, 2021 5:36 pm, edited 1 time in total.
david.prentice
Posts: 19
Joined: Thu May 14, 2020 8:39 pm
Answers: 1

Re: DFU bootloader has errors on new BlackPill F411

Post by david.prentice »

No problem. I was just expecting that there would be many F411 users and that HID 2.2 was mature, proven and functional for F411 (and F401). i.e. members had built and used HID for months and years.

David.
AndrewBCN
Posts: 105
Joined: Sun Apr 25, 2021 3:50 pm
Answers: 1
Location: Strasbourg, France

Re: DFU bootloader has errors on new BlackPill F411

Post by AndrewBCN »

david.prentice wrote: Mon Aug 30, 2021 2:17 pm No problem. I was just expecting that there would be many F411 users and that HID 2.2 was mature, proven and functional for F411 (and F401). i.e. members had built and used HID for months and years.

David.
FYI there is an entire section of this forum dedicated to discussing the HID bootloader. Unfortunately you started this thread with the wrong title and in the wrong section of this forum. :!:

Check here: viewforum.php?f=58

Also, summarizing: the DFU bootloader DOES NOT have errors on WeAct BlackPill STM32F411CEU6 boards, on the contrary, it works fine... as long as one follows the exact recommended procedure.
MrHazelnut
Posts: 1
Joined: Sun Apr 03, 2022 10:22 pm

Re: DFU bootloader has errors on new BlackPill F411

Post by MrHazelnut »

I have had a lot of trouble entering STM bootloader on weact blackpill v3 when pushing the buttons with my fingers. I can confirm that entering STM32 bootloader works flawless everytime if Im not using fingers (i.e not touching surrounding pins) when pushing BOOT0 and RST.
wanderlg
Posts: 4
Joined: Thu Jun 09, 2022 6:05 pm

Re: DFU bootloader has errors on new BlackPill F411

Post by wanderlg »

I don't know if I'm asking the question in the correct post, but I searched and didn't find this answer.
Is there a way to make the STM32F401 enter DFU mode through commands? ie: enter DFU mode via software.
GonzoG
Posts: 403
Joined: Wed Jan 15, 2020 11:30 am
Answers: 27
Location: Prudnik, Poland

Re: DFU bootloader has errors on new BlackPill F411

Post by GonzoG »

No. If it could be done, there wouldn't be need for HID bootloader.
ag123
Posts: 1656
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: DFU bootloader has errors on new BlackPill F411

Post by ag123 »

if you write an arduino sketch that jumps to the on-chip DFU rom address it may work. I've never tried and not sure how.
but this means in effect, your sketch needs to start the DFU boot loader. There may be other complications as well, e.g. in principle you need to send a "usb reset", i.e.pull D+ / D- to GND for 10 ms and restore it. This is to tell the host to enumerate ports again.
Then you can try jumping to the on chip boot loader.
look in the ref manual as well, you may dig out some 'tricks', e.g. a soft boot0 then followed by NVIC_SystemReset(). But in the same way your sketch needs to do the job.
Post Reply

Return to “General discussion”