Hosting a USB communications device on STM32

The example code I've seen for this connects two devices: the CDC implementation in the USB hardware, and the RS232 interface on the SCI device.

You should first get that example working unchanged, which will give you the equivalent of a USBserial dongle. Then rip out the code that drives the SCI (RS232) device and use the data in your own application instead. You might need to implement some buffering in the interface.

Clifford Heath.

Reply to
Clifford Heath
Loading thread data ...

Hi

I have a project where I need to host a CDC on an STM32F microcontroller. The usarts are in use hence the need for the CDC.

I have found library code from STs cube which configures the USB to host a CDC. The problem I have is making my application talk to the device. Obviously when a USB to serial adapter is connected to a windows PC a COMx interface is created which can then be connected to by an application. What I'm not clear on is how I would make the firmware in my STM32 talk to the CDC so that serial data can be passed to a connected serial device.

Can someone give me some hints on how to connect to the CDC device please?

Thanks

Andrew

--------------------------------------- Posted through

formatting link

Reply to
ajellis

Hi

I found the information required after post the same question at ST's site. I've pasted the link at the bottom.

The path to the info I needed was:

STM32Cube_FW_F4_V1.7.0ProjectsSTM324xG_EVALApplicationsUSB_HostCDC_Standalone

I hope this is useful to anyone who stumbles across this.

Andrew

formatting link

microcontroller.

a

COMx

to

--------------------------------------- Posted through

formatting link

Reply to
ajellis

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.