2019-01-30 10:47 PM
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?
2019-02-11 01:11 AM
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.
2019-02-11 04:05 AM
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
2019-02-11 04:24 AM
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
2019-02-11 04:54 AM
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
2019-02-11 06:00 AM
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.
2019-02-11 06:12 AM
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.