STM32F302 as USB Virtual Com Port Device.

Sysprogs forums Forums VisualGDB STM32F302 as USB Virtual Com Port Device.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6806
    btbass
    Participant

    I am trying to use STM32Cube to generate a VCP Usb device framework for the STM32F302CB micro.
    and then import it into Visual Studio.

    It works fine for a STM32F405 chip and a STM32F103 chip.

    But on the 302, it just wont enumerate properly?

    The only differences I can see are the 302 supports USB Device only, while the others have OTG support.

    Has anybody got the STM32F302 working as a usb device using the HAL drivers and STM32Cube?

    I am using Visual Studio 2013 pro and the latest version of VisualGDB.

    #6808
    support
    Keymaster

    Hi,

    There might be differences in the MCU initialization code and the external oscillator frequency. Please download the STM32F3 firmware package from ST and check the “Projects” folder for USB projects for your board/device. Then copy the SystemClock_Config() function and usb_conf/usb_desc files from a matching sample project.

    #6811
    btbass
    Participant

    Hi,
    Thanks for the response.

    I have a couple of Olimex boards, one with a STM32F405 and the other with a STM32F103.
    Using STM32CubeMX, I can generate a Usb Cdc framework and import it into Visual Studio as per your tutorial.
    Works great, both boards fire up ok and appear in Device manager as Com ports.

    The STM32F302CB device is on a small header board. The board only has the 48 pin micro, a voltage reg, 8MHz crystal and the usb pullup components on the board. All the boards use the same Voltage reg, crystal and USB interface circuits.
    I have scoped the osc and it is running at 8MHz. I have checked all connections with a meter. Power supply is good. I am reasonably confident in the hardware, I have two of the boards and they are acting the same.
    I have the latest Firmware package for the device in STM32Cube.

    I get ‘Device Descriptor Request Failed’ when I plug in the header boards.

    Googling about, I have seen others having similar problems with the usb on the 302 device?

    I will try to use a sample project that uses the same device to see if I can get it going.

    #9127
    buda
    Participant

    Hi,

    I am trying to create composite USB from STM32f446 (Nucleo board). I started from USB_CDC example, but got stuck when I had to add more configuration descriptors, because I don’t see how to register more than one class:

     

    USBD_Init(&USBD_Device, &COMPOSITE_Desc, 0);
    USBD_RegisterClass(&USBD_Device, &USBD_CDC);
    USBD_CDC_RegisterInterface(&USBD_Device, &USBD_CDC_SIT_V2_fops);
    USBD_Start(&USBD_Device);

    I would appreciate any advice on this matter. Thanks!

    #9140
    support
    Keymaster

    Hi,

    From a quick look it looks like the ST USB library only supports one device class at a time. We would recommend double-checking this on ST forums.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.