cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F107 USB Virtual Com Port - problem

morpeh89
Associate II
Posted on December 19, 2012 at 14:11

Hi!

I have a problem using USB as Virtual Com port on STM32F107. I use example code for USB CDC from IAR. I have two boards - with STM32F103 and STM32F107. The first one works properly with my code. When I use the second one, my PC (with Win XP) doesn't see any device connected.

I see from documentation, that F103 uses custom USB, whereas F107 uses USB_OTG. Does it change anything in my case? Should I use some other initial code?

I use just 3 pins for USB in this mode: A11 and A12 for RX and TX, and the third out pin, connected to D+ via 1.5K resistance (USB configuration pin). USB_OTG assumes usage of A9 and A10 for VBUS and ID, but are they really needed in the case of Virtual Com port? I did't use them in F103 and assume, that they are also not needed in F107.

The second moment to be reason of error (as I assume), is HSE frequency. On the board with F103 there are 8MHz oscillator. On the board with F107 there are 25MHz. If the first one works properly with my code, how should I change the code for the second board?

Any help will be much appreciated. Thanks in advance!
1 REPLY 1
morpeh89
Associate II
Posted on December 27, 2012 at 09:32

The problem was solved. I just found separate example of Virtual Com Port for STM32F107 on ST-website, and it worked without any changes of code. That is, device is seen by the PC.