Skip to main content
ab val
Associate III
February 26, 2018
Question

USB CDC Class problem

  • February 26, 2018
  • 1 reply
  • 808 views
Posted on February 26, 2018 at 10:02

Hi,

I am working on a nucleo STM32H7 and I am trying to communicate with a Hokuyo through USB. 

When  I connect the device  the init fails at some point in the usbh_cdc.c (USBH_CDC_InterfaceInit)

In this function there is first:

interface = USBH_FindInterface(phost, 

                                                    COMMUNICATION_INTERFACE_CLASS_CODE, //0x02

                                                    ABSTRACT_CONTROL_MODEL,    //0x02

                                                    COMMON_AT_COMMAND);   //0x01

then another one that fails: 

interface = USBH_FindInterface(phost,

                                                    DATA_INTERFACE_CLASS_CODE,

                                                   RESERVED,

                                                   NO_CLASS_SPECIFIC_PROTOCOL_CODE);

Could someone explain to me why the second function is called with different parameters?

Can I change those parameters to match the device's Class?

Here is the log:

USB| USB Device Attached

USB| PID: 0h

USB| VID: 15d1h

USB| Address (&sharp1) assigned.

USB| Manufacturer : Hokuyo Data Flex for USB

USB| Product : URG-Series USB Driver

USB| Serial Number : N/A

USB| Enumeration done.

USB| This device has only 1 configuration.

USB| Default configuration set.

USB| Switching to Interface (&sharp0)

USB| Class : 2h

USB| SubClass : 2h

USB| Protocol : 1h

DEBUG: Cannot Find the interface for Data Interface Class.

USB| Device not supporting CDC class.

#usbh #stm32h7
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
August 10, 2018

Sorry, bumping old zombie unanswered threads off my feed

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..