AnsweredAssumed Answered

Setup a USB module (FT232) with a STM32F103 MCU

Question asked by dan on Jul 16, 2015
Latest reply on Jul 20, 2015 by Clive One
Hi all,

I have a STM32F103VEH MCU which is connected to a FT232 USB module. All pins at the MCU with alternate functions are connected to the corresponding pins at FT232 USB module, which are:

PA11 -> USBDM (USB data minus)
PA12 -> USBDP (USB data plus)
PC12 -> Tx (alternate function UART5_Tx)
PD2 -> (Rx (alternate function UART5_Rx)

The problem is that I am not sure whether AF_PP or AP_OD should I use for these pins, or whether should I define speed (frequency) for these pins with alternate functions or not? I am almost sure that alternate functions are the correct solution and I don't need to define them as PP/OD output or FLOATING/PU/PD input and define the behavior myself, but would that be also possible instead of alternate function, however, I would prefer to use alternate function? The reason I am asking is that in all samples I have seen (samples which have been published by ST) sometimes Rx have been defined as AF_OD and sometimes it has been defined as floating input, so it is a bit confusing.

My second question is, am I free to chose polling, interrupt, together with or without DMA to improve the performance or for instance, when I am using UART5, I am limited to some options? I know that at UART5 at least does not offer DMA, so I would appreciate if someone can give me more info.