STM32F401CC - upload works, but no usb serial

Bootloader for STM32F103 and STM32F4xx micro-controllers
No special driver is required. Support for Windows, Linux and Mac Operating System
Post Reply
Aiyseri
Posts: 3
Joined: Fri Oct 27, 2023 7:16 pm

STM32F401CC - upload works, but no usb serial

Post by Aiyseri »

Hi Everyone,
I got myself a little board with an STM32 (my first). Its an STM32F401CCU6.

The board is not really for development, so it lacks proper breakout of the BOOT pins. So I have to put a wire between USB VCC and BOOT0 to get it into DFU mode everytime I want to flash it which is a pain, so I decided I wanted to get the HID bootloader up and running on the board so I can program it Arduino style (Press Play).

I checked over on GitHub and arrived at Serasidis repo, which I cloned and modified the F4 bootloader code since it does not have readily defined support for the F401CC (his code is for F407). If anybody's interested I can post it back to GitHub with my mods.

Following instructions here and there, fetching .S and .ld files for the MCU + the instructions to get the clocks up and running proper at 48MHz which was discussed for Blackpill F401CC I got the board to boot up and get recognized on my machine with the HID\VID_1209&PID_BEBA&REV_0300, yay!

I can program it from the Arduino environment and I've checked the flash contents with STM32Cube so the code is there at 0x08004000 where its supposed to be, but my problem is that I don't get the USB serial up and running.

Is the thing just stuck in the bootloader mode all the time? Am I missing something with the BOOT pins ?

I'm noob for STM32 stuff so I thought I'd reach out for some help.

Best regards,
Aiy
Aiyseri
Posts: 3
Joined: Fri Oct 27, 2023 7:16 pm

Re: STM32F401CC - upload works, but no usb serial

Post by Aiyseri »

Oh, I found the mistake myself.
It was the BOOT1 pin being low that held the device in bootloader mode all the time.
For now I've disabled the BOOT1 pin check in the bootloader code.
As a consequence it needs some arduino code present at the userspace code at 0x8004000 or we dont get into userland.. I guess thats an the extra step not exactly spelled out in the GitHub repo for the bootloader...

Best regards,
Aiy
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: STM32F401CC - upload works, but no usb serial

Post by ag123 »

you need to specify which core / repository that you are using
Post Reply

Return to “STM32 HID bootloader”