cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to use USB HOST (CDC type) on STM32F746ZG failed receiving data

Ofer
Associate III

Hi

I'm trying to read the output from BARCODE reader (ES4650) using USB-HOST using CDC type.

On connecting the USB cable I'm getting SOF interrupts (although I disable the Signal SOF on CUBE). On pointing the barcode reader to a barcode I'm getting some USB interrupt causes (USB_OTG_GINTSTS_RXFLVL and USB_OTG_GINTSTS_HCINT - both for IN and OUT).

On getting those interrupts I'm looking in the USB data buffer and see no data.

The CDC Class is as follow:

USBH_ClassTypeDef CDC_Class =

{

 "CDC",

 USB_CDC_CLASS,

 USBH_CDC_InterfaceInit,

 USBH_CDC_InterfaceDeInit,

 USBH_CDC_ClassRequest,

 USBH_CDC_Process,

 USBH_CDC_SOFProcess,

 NULL,

};

The code never reach those functions.

I was accepting using other drivers functions as USBH_CDC_Receive or USBH_CDC_ReceiveCallback but as you can see, the CUBE defines others.

What do I do wrong ?

Thanks

2 REPLIES 2

Maybe the device is not CDC ACM compliant. Check the descriptors it sends (maybe when connected to PC, e.g. using lsusb if you are using Linux).

JW

Hi JW

The device support both USB-HOST virtual com-port and USB-HOST HID (keyboard).

I tested the HID mode and it works like a charm, so I don't have to test the CDC anymore - thanks anyway.

Ofer