STM32F4 Discovery board + USB CDC

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
wizzardsl
Posts: 3
Joined: Thu Jun 27, 2013 7:30 am

STM32F4 Discovery board + USB CDC

Post by wizzardsl »

Does anyone have a USB CDC example that works with the latest Release? I have tried the one included in the demo + the test hal and every time I try to use the USB it registers as unknown device on my windows 7 PC.
I'm compiling / loading the code in IAR so if possible maybe a simple IAR project? I also checked and the PID / VID when it's connected to the windows PC does not match what I set in the USB driver settings so it's like some ins are not set correctly for my board. Any help would be greatly appreciated I've been trying all angles for the last week trying to figure it out..
Thanks.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4 Discovery board + USB CDC

Post by Giovanni »

Hi,

You need to install a driver (attached), the demo mimics an ST Virtual comm device.

Giovanni

oem112.zip
(901 Bytes) Downloaded 690 times
wizzardsl
Posts: 3
Joined: Thu Jun 27, 2013 7:30 am

Re: STM32F4 Discovery board + USB CDC

Post by wizzardsl »

Giovanni wrote:Hi,

You need to install a driver (attached), the demo mimics an ST Virtual comm device.

Giovanni

oem112.zip



yes

Code: Select all

static const uint8_t vcom_device_descriptor_data[18] = {
  USB_DESC_DEVICE       (0x0110,        /* bcdUSB (1.1).                    */
                         0x02,          /* bDeviceClass (CDC).              */
                         0x00,          /* bDeviceSubClass.                 */
                         0x00,          /* bDeviceProtocol.                 */
                         0x40,          /* bMaxPacketSize.                  */
                         0x0483,        /* idVendor (ST).                   */
                         0x5740,        /* idProduct.                       */
                         0x0200,        /* bcdDevice.                       */
                         1,             /* iManufacturer.                   */
                         2,             /* iProduct.                        */
                         3,             /* iSerialNumber.                   */
                         1)             /* bNumConfigurations.              */
};


with PID / VID as set above (ST) but when I look at the unknown device the PID / VIO are: USB\VID_0000&PID_0000\6&D508162&0&2

which does not match, I tried to change the values in the inf driver to match and windows still won't accept that. It looks to me like the USB on the board is not being init correctly and is in an improper state.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4 Discovery board + USB CDC

Post by Giovanni »

Hi,

I just re-tested the demo ARMCM4-STM32F407-DISCOVERY-MEMS, apparently everything is OK.

Could it be a toolchain problem? what toolchain are you using?

Giovanni
wizzardsl
Posts: 3
Joined: Thu Jun 27, 2013 7:30 am

Re: STM32F4 Discovery board + USB CDC

Post by wizzardsl »

You are correct that demo works in the trunk as does USB when I use eclipse vs IAR. Thanks.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4 Discovery board + USB CDC

Post by Giovanni »

Hi,

I will try using the IAR in that demo ASAP.

Giovanni
Post Reply