Home > ARM > STM32 USB Connection

STM32 USB Connection

January 25th, 2010 Leave a comment Go to comments

The USB connection between the STM32 and the computer is finally working.
I’ve tried the different USB programs from the StdPeriph Library

Fx.

  • Virtual COM Port
  • DFU Programming

As I’m using Ride7 for programming, I can upload the project and sources if you want me too.

 

OBS: If you have projects which DOESN’T use the USB, you have to set the USB Disconnect jupmer to Ground (Pos. 1-2), as if not, the STM32 will stop in some kind of USB Interrupt trying to make a data communication with the computer, but it never comes as the STM32 doesn’t start one!

I discovered this Ã? when I tried DFU’ing my 320×240 LCD code – and when I went back to normal .hex, it didn’t work – that was because I had to set the USB Disconnect to Ground!

Categories: ARM Tags: , , ,
  1. DAXweb
    September 11th, 2010 at 19:08 | #1

    Thx for your info
    it’s very usefull
    i would ask you if you can publish the source code of this project…
    thx
    DAXweb

  2. September 11th, 2010 at 20:53 | #2

    @DAXweb
    I’ve now uploaded my changed STM32 USB Development files: grab them here

  3. shreekant
    September 20th, 2011 at 05:12 | #3

    Hello..I am trying to use STM32 virtual USB com port.I hgave installed the virtual com port driver from st site.My system shows the installed driver.I am using Advanced USB Port Monitor software for capturing text files from USB port.But The board is neither getting detected by the PC nor there is any notification regarding the new hardware connection etc..Please tell me the detaile procedure that how can I use my STM32 USB port as a virtual COM port for analysing the data.

  4. September 23rd, 2011 at 21:42 | #4

    @shreekant
    Dear Shreekant.
    Have you made the required USB connection to the STM32 chip?
    You should take a look at the STM32 Evaluation board schematic to see the correct connections. This can fx be found at page 32 in the STM3210E-EVAL manual.
    You should also take a look at the user manual for the USB-FS-Device library from ST.

    Thomas

  5. May 2nd, 2012 at 03:27 | #5

    Hello Thomas, I?m working with Olimext dev board STM32-P103. They provided Virtual Com port example & driver for win xp. It?s not working. I?m using IAR Embedded wokbench & window 7. I?m not sure whats wrong. Any help is appreciated.
    Thanks

  6. May 8th, 2012 at 22:02 | #6

    @Harinath
    Dear Harinath.
    First have you confirmed that the USB port is enabled. The DISC pin at PC.11 has to be set at the proper voltage.
    There can be differences from dev board to dev board as which pins are used for the USB disconnect transistors.

    If the pin definition is ok the example should work out of the box.

    Regards Thomas

  7. mustapha
    February 28th, 2013 at 17:52 | #7

    I am trying to do my project based STM32-P103 card but I am having the problem at the level of communication with my PC.
    my question if possible to program the card using USB port without using JTAG?

  8. February 28th, 2013 at 18:23 | #8

    @mustapha
    You can not use the USB Port on an STM32F103 to program it, without first having programmed a bootloader application into the Flash.
    Though you CAN program the device using a Serial port (UART = TX/RX) as the STM32F1xx devices contain a hardcoded serial bootloader that can be activated by setting the BOOT pins properly!

  1. No trackbacks yet.