2017-06-09 03:57 AM
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 #ft2232h2017-06-10 09:09 AM
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.
:(
2017-06-14 02:49 AM
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
2017-06-14 02:56 AM
yes for all questions.
2017-06-14 03:05 AM
but is the STM32F070 programmed using the same usb connector or how would you program this MCU?
Thank you
2017-06-14 03:36 AM
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.