cancel
Showing results for 
Search instead for 
Did you mean: 

How to upload custom firmware from CubeIDE to STM32F401CCU6 board?

PRout.1
Associate II

I have a STM32F401CCU6 board with me. It has a UART bootloader option and USB_OTG_FS is in 'Device_Only' mode. The USB_DEVICE is set to 'Communication Device Class'. USART2 is enabled in Asynchronous mode.

  1. I want to flash the firmware using UART. I don't want to use SWDIO mode.
  2. The data transmission should happen through virtual com-port using USB.

I was checking AN2606 but still no success.

I have one TTL to USB converter.

Any tutorial or pointer to a forum solution would help in resolving the issue.

Best,

1 REPLY 1
TDK
Guru
  1. Hook up the USB to UART converter to pins supported by the UART bootloader per AN2606.
  2. Put the chip into bootloader mode.
  3. Program the chip using the UART bootloader commands over the relevant serial port. (Stm32CubeProgrammer can also do this.)

If USB is connected directly to the chip, you'll need to disconnect it first to avoid the chip going into the USB DFU bootloader.

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