cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103 USB Virtual COM problem

pkumar1883
Associate II
Posted on October 25, 2013 at 16:13

Hi,

I am using olimex kit of  STM32F103RBT6 microcontroller. I am new in USB virtual COM programming.

I am using STM32_USB-FS-Device_Lib_V3.3.0 with Keil MDK-ARM 5.0 IDE.

I opened the precompiled Virtual Com port project from library folder. In DEBUG tool I have selected STM3210b-eval and Rebuilt all files. I flashed the HEX file in my microcontroller.

Then connected the kit USB port with PC. But nothing happening in device manager on PC side.

So please suggest me why this in not working. 

#lmgtfy #metoo-maybe
13 REPLIES 13
Posted on October 25, 2013 at 17:27

So please suggest me why this in not working.

Perhaps you need to port the code to your board, doesn't the example have pin dependencies, and LCD support that will need to be addressed?

Have you tried using the debugger, and seeing if the device is responsive, or what it might be doing?
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
pkumar1883
Associate II
Posted on October 26, 2013 at 08:03

Posted on October 26, 2013 at 12:48

You should top post responses so they aren't hidden.

I think you are right. Actually I could not get STM32F10B-EVAL board schematic from ST site. So can send me some link from where I can download this. In this way I can compare this schematic with my board schematic(OLIMAX STM32F103RBT6 schematic). So by this I can make the required changes in code as per the hardware requirement.

http://www.icbase.com/File/PDF/STM/STM30870802.pdf

Most of the specific detail is encapsulated in the source/includes, like pin/peripheral associations
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
pkumar1883
Associate II
Posted on October 26, 2013 at 14:08

vitabreviss
Associate II
Posted on December 24, 2013 at 15:28

clive1,

hi, I have the same problem, & time limit,

can you help me too ?

Posted on December 24, 2013 at 15:51

I'm not clear on the sameness of your problem, or why the prior advice given wouldn't be applicable?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
vitabreviss
Associate II
Posted on December 25, 2013 at 01:13

I have self made PCB .. with STM32F103R8T6, 12MHz ext clk., USB PA11, PA12, pullup PD2,  Ulink, Keil422,  my app. works fine, I  added USB on PCB & wish to try it too.

STM32_USB-FS-Device_Lib_V4.0.0  usbcom .. of course not works, I did not expect,

what now ? dig in code & have headache with pdfs .. but on first turn this job  is not smooth.

I kindly ask you if you tell me what I have to fix ? you can not tell me details, only which parts .. I told you enough ?  

Posted on December 25, 2013 at 03:03

Ok, so rather different than before, ''not works'' is a bit broad, can you narrow that down a bit?

I guess with a 12 MHz crystal I'd be concerned that you have the correct PLL and clock settings, and that HSE_VALUE was defined correctly for the baud rate computation. The goal being to generate a 72 MHz clocks, and a 48 MHz clock (72 / 1.5). Can you check the internal clocks via the PA8 MCO pin?

Which evaluation board did you use as the starting point to build the project? Assuming you don't have an LCD did you remove that code?

Have you done any debugging, does the board crash with a Hard Fault, or get stuck in some other loops? Does the USB device show up on the PC? If you reset with BOOT0 High does it show up as a USB DFU device?

Do you have any other evaluation boards with known working USB implementations?
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
vitabreviss
Associate II
Posted on December 26, 2013 at 22:18

 Hi Clive1,

I am late, here we have crazy days

 1. nice thing: boot0=vcc, my crystal is12MHz, internal code seems takes HSE and expect

     8MHz => does not work & this days I am at home without oscilloscope  => no MCO :(

 2. I have some eval. boards but they all have STM32F4 micro

 3. My self board of course has no LCD , it is simple ..

 4. I started from USB zero point, from ST page I downloaded this:

    

STM32_USB-FS-Device_Lib_V4.0.0

.zip

      I checked everything around RCC regs ..

     it was really strange the code died even debugger died, everything,  (I think it went in sleep

     mode,   who knows why has stuck so hard) anyway I want to know what happen . I 

     checked clocks over UART.  It has to work but did not 🙂

5. Than I took this: STM32F103-DualCDC-master.zip

     - I changed clks regs as before, port for pullup and ..   it works ..

     - WinXP device manager shows me: STM32 Virtual COM port .. but with yellow ! mark

     - something is wrong, special device driver? maybe yes, bc FTDI does not need

        additional driver, STM is not FTDI and now I do not know enough to solve this quick.

     - I am a step forward I have  USB code which gives me something , I have to learn more .

Thank you for your help and hope if I can ask you more about usb in close future.