cancel
Showing results for 
Search instead for 
Did you mean: 

Programing two different STM32F4 using the same usb conexion

Gregorio Vidal
Associate II
Posted on June 09, 2017 at 12:57

Hi all,

I designed a electronic board with two microcontrollers (STM32F401 and STM32F407), for my project.At the moment, I am using an external ST-link and the SWD to program them in the prototype. Every MCU has a SWD header to be programmed. My supervisor told me that they want to have a USB connector in the board, to program both microcontrollers and with not external hardware like ST-LINK or similar, so the debugger/programmer interface should be built-in the board for the final version of the board. I thought of two possible options:

Using the FT2232H ( Dual High Speed USB to Multipurpose UART) which has two different serial outputs a program every micro using the UART

bootloader

. But additional actions are required to do that as the BOOT pin should be connected to 3.3V and the MCU needs to be reset. Is it right?

The other option would be the same but using the serial port of the FT2232H as SWD. Would it be possible?

I don't know if these solution are right or if it will take long to develop them. And I you know better solutions please, let me know

Thank you

Regards

Gregorio

#uart #usb #bootloader #st-link #swd #ft2232h
5 REPLIES 5
Zt Liu
Senior III
Posted on June 10, 2017 at 18:09

Few weeks ago, my boss asked me almost the same question. 

FT2232 occurred to my mind immediately, but concerning its price, I'm afraid to get fired......

:((

In the end, I choose a value-line TSSOP20 STM32F070,

(my boss ilkes its price and my hardware colleague likes its package)

there is a USB device peripheral and two uart ports, with some other gpios to do the Rest job.

Don't get too excited right now! For the USB peripheral conflicts with uart1.

So

1 you choose a cheap switch ic to mux UART 2 to two difference MCU,or ....

2 there is still a SPI, yes there is,  for you to boot the other mcu.

Hope you find a better way than mine.

Good luck. 

:(

Posted on June 14, 2017 at 09:49

Hi Zhitai Liu,

So what you are doing is using the STM32F070 instead of the FT2232. Is it right? and is the STM32F070 in the board with the other two MCUs?

and you need to program this MCU before programming the other two. don't you?

Thank you

Gregorio

Posted on June 14, 2017 at 09:56

yes for all questions.

Posted on June 14, 2017 at 10:05

but is the STM32F070 programmed using the same usb connector or how would you program this MCU?

Thank you

Posted on June 14, 2017 at 10:36

I currently leave a SWD port on the board for this mcu.

If you want to use the boot bode of this mcu, TSSOP20 package seems conflicts with your need.