+ Post New Thread
Results 1 to 7 of 7
  1. #1
    Newbie level 3
    Points: 451, Level: 4

    Join Date
    Oct 2016
    Posts
    3
    Helped
    0 / 0
    Points
    451
    Level
    4

    Problem with VPC USB FS and STM32F103VET6 device.

    Hello Community,



    I purchased a Cortex-M3 STM32F103VET6 board and trying to implement USB FS on it. I'm using CubeMX to generate code, the version is up to date and i'm using the latest firmware libraries (FW_F1_V1.6.1). After compile USB device doesn't appear on the Device Manager.

    Are there somebody who can help me fix this problem.



    Thanks and BRs,

    •   AltAdvertisment

        
       

  2. #2
    Junior Member level 2
    Points: 390, Level: 4
    ArakelTheDragon's Avatar
    Join Date
    Jul 2017
    Location
    If you like the post, please press "Like".
    Posts
    21
    Helped
    2 / 2
    Points
    390
    Level
    4

    Re: Problem with VPC USB FS and STM32F103VET6 device.

    Please check the application note and please post a circuit and code.

    Application note: AN4879: USB hardware and PCB guidelines using STM32 MCUs
    from https://www.st.com/en/microcontrollers/stm32f102r4.html



  3. #3
    Newbie level 3
    Points: 451, Level: 4

    Join Date
    Oct 2016
    Posts
    3
    Helped
    0 / 0
    Points
    451
    Level
    4

    Re: Problem with VPC USB FS and STM32F103VET6 device.

    I bought this evaluation board from the devicemart.co.kr website.

    https://imgur.com/a/pe8RdoY

    I created a STM32CubeMX project with some setting change like below:
    - RCC: HSE: Crystal/Ceramic Resonator
    - SYS: Debug: Serial Wire
    - USB: Turn on Device (FS)
    - USB Device: Communication Device Class (VPC)
    - Others: Default

    Then, I generate code and flash into this device. However, nothing appears in the Device Manager tree.

    I tried to increase the Minimum Heap Size to 0x1000 follow this link: https://community.st.com/s/article/F...not-recognized
    but its same phenomenon.



    •   AltAdvertisment

        
       

  4. #4
    Advanced Member level 4
    Points: 7,178, Level: 20

    Join Date
    Jan 2015
    Posts
    1,002
    Helped
    319 / 319
    Points
    7,178
    Level
    20

    Re: Problem with VPC USB FS and STM32F103VET6 device.

    Does your device actually have an 8MHz crystal connected to pins 12 and 13 on the MCU? Many of the ST-based development boards I've seen have the 32kHz crystal for the real time clock but rely on the internal oscillator for main system clock.
    The schematic does show the 8MHz crystal but also says that it is socketed - you may need to add it yourself.
    The alternative is to use the internal oscillator and the internal PLLs to get the correct frequency for the USB device. The clock tab in the STMCubeMX IDE will tell you when you have it right.
    One other way to tell is to start with something simpler such as the flash a LED, or even try to debug a simple bit if code - if the code runs at all then the system clock settings are OK (although the frequency may still be wrong).
    Susan



  5. #5
    Newbie level 3
    Points: 451, Level: 4

    Join Date
    Oct 2016
    Posts
    3
    Helped
    0 / 0
    Points
    451
    Level
    4

    Re: Problem with VPC USB FS and STM32F103VET6 device.

    Quote Originally Posted by Aussie Susan View Post
    Does your device actually have an 8MHz crystal connected to pins 12 and 13 on the MCU? Many of the ST-based development boards I've seen have the 32kHz crystal for the real time clock but rely on the internal oscillator for main system clock.
    The schematic does show the 8MHz crystal but also says that it is socketed - you may need to add it yourself.
    The alternative is to use the internal oscillator and the internal PLLs to get the correct frequency for the USB device. The clock tab in the STMCubeMX IDE will tell you when you have it right.
    One other way to tell is to start with something simpler such as the flash a LED, or even try to debug a simple bit if code - if the code runs at all then the system clock settings are OK (although the frequency may still be wrong).
    Susan
    Device has an 8MHz crystal connected to pins 12 and 13 on the MCU.
    I already tried to make some sample codes using I2C, SPI, Led blink and debug these source using ST-Link V2. It works normally.
    The remaining problem is the connecting problem with the computer using Micro-USB (USART1).



    •   AltAdvertisment

        
       

  6. #6
    Junior Member level 2
    Points: 390, Level: 4
    ArakelTheDragon's Avatar
    Join Date
    Jul 2017
    Location
    If you like the post, please press "Like".
    Posts
    21
    Helped
    2 / 2
    Points
    390
    Level
    4

    Re: Problem with VPC USB FS and STM32F103VET6 device.

    You are missing something in the steps, you don'y have drivers for the computer. The computer does not recognize the device probably. This thread would be better for the st comminity



  7. #7
    Advanced Member level 5
    Points: 8,870, Level: 22
    Achievements:
    7 years registered
    Easyrider83's Avatar
    Join Date
    Oct 2011
    Location
    Tallinn, Estonia
    Posts
    1,567
    Helped
    358 / 358
    Points
    8,870
    Level
    22

    Re: Problem with VPC USB FS and STM32F103VET6 device.

    No, drivers is not a problem. If computer react anyhow that at least something is connected, then yes - check vid and pid, drivers and e.t.c.
    Seems to be he doesn't have a 1.5k enabled to D+. In many cases I just connect it directly to vdd, but here it probably need to have a logic pin in high state.
    Even with erased flash and no oscillation computer will report that it is connected.
    Love me or hate me. All infractions will be ignored.



--[[ ]]--