New STM32F401CCU6 Black Pill

Post Reply
alu
Posts: 5
Joined: Thu Jan 14, 2021 5:50 pm

New STM32F401CCU6 Black Pill

Post by alu »

Hi

I recently bought a "new" black pill board from Aliexpress. I see that is new because the pinout is slightly different from other boards.

https://es.aliexpress.com/item/4001157813131.html

Doc is in Chinese. Hope someone has more information.

That is my first STM32 board. I can use with arduino and download with DFU mode via USB (well it has a hard time getting into that mode sometimes), now I am researching to download with a bootloader. Any help would be appreciated.
Attachments
STM32F401CCU6 Black-pill
STM32F401CCU6 Black-pill
IMG_193018_1.jpg (58.45 KiB) Viewed 8824 times
STM32F401CCU6 Black-pill
STM32F401CCU6 Black-pill
IMG_192956.jpg (33.47 KiB) Viewed 8824 times
STM32F401CCU6 Black-pill
STM32F401CCU6 Black-pill
IMG_193948.jpg (64.3 KiB) Viewed 8824 times
fredbox
Posts: 125
Joined: Thu Dec 19, 2019 3:05 am
Answers: 2

Re: New STM32F401CCU6 Black Pill

Post by fredbox »

No need for additional bootloaders.

Press both buttons, release reset, release boot 0. That should put you in dfu mode.
alu
Posts: 5
Joined: Thu Jan 14, 2021 5:50 pm

Re: New STM32F401CCU6 Black Pill

Post by alu »

Yes I do!. My problem was that if usb serial is opened, they can't enter in DFU. So first close serial.
I hope with some downlader I can simplify process.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: New STM32F401CCU6 Black Pill

Post by ag123 »

try using a st-link v2
https://www.adafruit.com/product/2548
https://octopart.com/st-link%2Fv2-stmic ... s-20057793
https://octopart.com/2548-adafruit+indu ... 88022?r=sp

it saves you the trouble of pressing the buttons.
but otherwise i'm simply using the button presses it is adequate for downloads.
the finger dance is
- press both reset and boot0
- release reset
- release boot0 1 sec later

and st-linkv2 is a SWD debugger - it is more useful than just downloading firmware

alternatively you can search for 'hid bootloader' using the search box on top of this web.
i've not used it. i'm happy with just st-link and the built-in usb dfu bootloader
microman
Posts: 2
Joined: Mon Feb 28, 2022 3:21 pm

Re: New STM32F401CCU6 Black Pill

Post by microman »

I also have a couple of these unbranded Blackpills. (Black PCB, LED on PC13, 3 oval buttons on top and no logo on the botom side just a white box.)

I can program it using an ST-Link V2 in SWD ok. However, it is not detected as a DFU device neither by DFUSE-Demo v3.06 nor STM32CuBEProg. I do not see it as a USB device in 64 bit Windows 7 pro nor does USB-View appear to detect it.

DFuse-demo claims that there are no DFU device attached.
Similar for STM32CubeProg.

I have tried:
a) powerup / NRST - starts the fade program on LED PC13
b) press & hold boot0 + NRST - release NRST (Blue LED stops flashing, only RED pwr LED on) - still n -> similar resultot recognised as DFU device.

c) press & hold KEY + NRST ~ goes into key toggle of LED PC13. Hold for 1/2 S -> flashes then Blue LED extinguishes - still not detected as DFU.

Does the DFU bootloader exist in firmware in all STM32F401CC s or only in Flash / some variants?
blackpill.jpg
blackpill.jpg (38.15 KiB) Viewed 6778 times
Any ideas?

Thanks

Peter
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: New STM32F401CCU6 Black Pill

Post by ag123 »

step (b) is correct, that is the DFU mode
GonzoG
Posts: 403
Joined: Wed Jan 15, 2020 11:30 am
Answers: 27
Location: Prudnik, Poland

Re: New STM32F401CCU6 Black Pill

Post by GonzoG »

microman wrote: Mon Feb 28, 2022 4:28 pm Does the DFU bootloader exist in firmware in all STM32F401CC s or only in Flash / some variants?
DFU in F401 is a hardware feature. But on those boards it's tricky to reset them into DFU mode.
I have 12 and 2 of them are almost impossible to reset into DFU.
microman
Posts: 2
Joined: Mon Feb 28, 2022 3:21 pm

Re: New STM32F401CCU6 Black Pill

Post by microman »

Thanks

I have sorted the 'dfu' problem. - I had 2 x USB A - C cables that look the same. However, one has only 2 pins wired through and is a charge cable, the other has all the pins wired through and is a charge and data cable!

I now have a second issue.

Whereas the PC detects the 'dfu' as 'STM32 Bootloader' and STM32CUBEProg (V2.90) is happy to use it in DFU mode as USB1, DFuseDemo (v3.0.6) does not detect any 'dfu' devices present.

The PC sometimes reports the BlackPill as 'Unknown device' changing to a different USB port seems to solve the Windows detection issue and it again picks up the device as 'STM32 Bootloader'


Peter
Post Reply

Return to “STM32F4 based boards”