cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030F4P6 using UART

DRicc.2
Associate III

I have a custom PCB I designed where I intend to use UART via PuTTy, however, I'm not entirely sure how to do this through the cube IDE. Normally with the Nucleo L476RG, the device is recognized and I upload code via USB, however, I need to flash the proper driver to be able to upload code on my current board. My schematic can be found here: https://pdf.ac/CP7hx.

 

The board successfully bootloads and I can upload code via my ST-LINK and pogo pin header, but I'm not sure how to get the device recognized as an STM32 board, currently under my device manager its listed as a "USB Serial Port (COM4)". I found this video: https://www.youtube.com/watch?v=wGbiT6IxGP0&t=302s that shows how to install the STM32 USB bootloader, however, I don't know what file to download to the device. The device is recognized under the Flash Loader demonstrator, but here is the step I get stuck at:

DRicc2_0-1722128603925.png

What do I put for the part highlighted in red? My UART IC is communicating with the USB connector since I could get to this step but couldn't find a proper driver for the STM32F030F4P6.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

I got it to work! 

All I needed to do was set the BOOT0 Pin high when uploading the code, then in PuTTy set it to COM4 with a baud rate of 115200 b/s. After that, by hitting the NRST pin I can display my text on the UART terminal! I still don't know if there is a way to upload code directly via my USB port, but this was the more important problem I was trying to figure out initially.

View solution in original post

3 REPLIES 3
TDK
Guru

To upload code via the UART bootloader, boot into the bootloader by holding BOOT0 high during reset, use STM32CubeProgrammer, then select UART and the COM port it's connected to.

You're using an FT230X chip, which is a UART to USB device. It's going to appear as a generic serial port, but that's not a problem for anything.

> I can upload code via my ST-LINK and pogo pin header

Why not continue to use SWD to debug/program the board?

The bootloader on the STM32 resides in ROM. It is not something that needs to be installed--it is always there. Sometimes, users install custom bootloaders, but that is different from the system bootloader.

If you feel a post has answered your question, please click "Accept as Solution".
DRicc.2
Associate III

There's no way I can directly upload code via USB for my device on STM32Cube IDE? That was my original intention with this board as I wanted to upload code without having to use the ST-Link every time and read it from PuTTy. 

 

The device was able to be read in the STM32Cube Programmer which is a good sign: 

DRicc2_0-1722134035628.png

But now how do I upload code directly in Cube IDE via USB? or is that not possible with the given UART ic I selected?

I got it to work! 

All I needed to do was set the BOOT0 Pin high when uploading the code, then in PuTTy set it to COM4 with a baud rate of 115200 b/s. After that, by hitting the NRST pin I can display my text on the UART terminal! I still don't know if there is a way to upload code directly via my USB port, but this was the more important problem I was trying to figure out initially.