Showing results for 
Search instead for 
Did you mean: 

STM32L4P5VGT - CDC, MSC and Pen Drive Support on USB

Associate III

Dear Members,

We are using STM32L4P5VGT, with USB (supports OTG). The said product has a USD card with an SDIO interface to store the sensor data. The USB is planned to be used following purposes.
1. CDC for Laptop serial communication to send real-time sensor data in office climate.
2. MSC (upload the stored data on the USD card to the Laptop, ie stored data in the field and dump in the office). I know, that it can be done using CDC also, using command and reply base mechanism. Already been used in one of the products, using the STM32L1 series processor.
3. Support for Pen Drive - To dump the data from the USD card to the External Pen Drive in the field.

I have used CDC for serial communication and USD data dump using command and response mechanisms. Similarly, I have worked on real-time data streaming using a USB device/CDC class and a Pen Drive with a USB Host. Never worked on OTG mode.

I need advice from you, who has already done or is aware of the best solution.

Is it only OTG solution for this or other modes eg device or host?

I have seen some examples of CDC plus MSC in USB device mode, but not sure, if is it possible to use here a drive.

Let me know a good approach, and link for any example if available.

Thanks in advance