2012-12-19 05:11 AM
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!2012-12-27 12:32 AM
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.