cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC demo on STM32L0 Discovery Board?

jsvirzi
Associate II
Posted on December 29, 2014 at 20:16

Hello,

I am switching an application from RS232-based to USB-based between the host (either Linux or Windows) and a sensor module. I am currently using an STM23L053C8 processor to gather data from sensors and send them to the host. Very simple topology. To simplify matters even more, the RS232 protocol is 9600 8 N 1.

I am new to USB, but have been trying to follow discussions to implement USB. I used the STMCube to generate a USB CDC application, but have no idea where to begin after that. The application compiles fine and downloads to the board via ST-LINK. No problem there.

In the multiple discussions that I have seen, everyone begins with some snippet of code. I need the WHOLE thing to see how it goes together. To be even more of a picky beggar, does anyone have any skeleton code that maybe sends ''Hello, world'' to the host, and receives data back? Preferably, the code is for my particular DISCOVERY board.

As a side comment, I see many posts where people have to modify code from the STM32Cube program to get things to work. I worry that I would not be able to get to the point that I can see anything. For example,

/public/STe2ecommunities/mcu/Lists/STM32Java/flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/USB%20CDC%20Bug%20in%20CubeMX%20firmware&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&currentviews=2238

Also, what is the difference between CDC and VCP? I keep seeing both come up.

Thanks everyone in advance. I know this is a lot to digest, but the most basic of programs would go a long, long way. Think hello.c.

-Joseph

P.S. I am using the Keil microVision tools. There is an excellent example code, in extremely basic form (which is perfect for beginners like me) at

http://visualgdb.com/tutorials/arm/stm32/usb/

#stm
0 REPLIES 0