cancel
Showing results for 
Search instead for 
Did you mean: 

How to use F746NG-DISCO and USB OTG_HS

Cevdet
Associate III

Hello

I want to send 45 Mbyte/sec data from the discovery board to PC . So I need to use usb high-speed protocol (CDC). But PC doesn't find the device (I've checked it via the device manager).

I used the CubeMX for code generation.

What I simply did is:

-Activate RCC, SYS Serial Wire, OTG_HS, USB Device

But it doesn't work . PC does not find the device.

What should I do?

6 REPLIES 6
Amel NASRI
ST Employee

Hi @Cevdet Baş​ ,

Did you tried to run the examples available under STM32Cube_FW_F7_V1.14.0\Projects\STM32746G-Discovery\Applications\USB_Device?

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi @Amel NASRI​ ,

Yes, of course.

But none of them is about USB CDC protocol.

There must be something missing that I forgot to activate a peripheral

S.K.Matters
Associate II

Hi,

In case you are testing under Windows: To make sure Windows installs and enables the device without showing the yellow exclamation mark in the 'DeviceManager', I had to change the CDC_DATA_HS_MAX_PACKET_SIZE in usbd_cdc.h to 256 (default is 512).

But looking at the 45MBytes requirement, I personally doubt, that you will easily succeed. So far, I didn't see USB2 throughput much higher than 40MBytes/sec. Personally I count in real-life for my devices with ~24MByte/sec.

btw: With STM32F769 CDC in USB HS Mode, I have achieved out of the box just a few MBytes/s. One reason for the low throughput was the usbser.sys driver from windows, which is the default driver for handling Com-Ports under Windows. But even when using another usb driver (libusb), the STM32F769 throughput was in my STM32 setup max around 10MByte/sec so far.

Because CDC was initially not designed for high speed, some fine tuning of the STM32 USB-CDC Stack might eventually improve the throughput. But I didn't go into details about this so far...

br

Hi @S.K.Matters​ 

Thank you for interesting.)

In STCubeMx Configuration, it says "Device High Speed 480Mbits/s", this equals 60Mbytes/s, right?

But what I want to know is why my PC is still find the device.

I tried CDC_DATA_HS_MAX_PACKET_SIZE as

#define CDC_DATA_HS_MAX_PACKET_SIZE 256

and

#define CDC_DATA_HS_MAX_PACKET_SIZE 64 (because some people says it must be 64)

but both of these configurations did not work.

And I would like see your working F769 code . If you share, It makes me so happy.

Best Regards

Interaction on the USB connection is half-duplex, switching back and forth will significantly diminish the achievable bandwidth.

It is going to be hard to generate and manage a stream of 45MBps, and definitely not with a CDC class. For firehose application perhaps looks at how video camera class devices are architected.

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

Okay, I decrease the data length per second, I just want to see OTG_HS function work on discovery board.

I just want to understand how to work HS peripheral on the board.