cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476 Discovery USB CDC Class Source code or Example

Sunny T
Associate
Posted on September 04, 2017 at 16:24

Hi,

      I am using STM32L476 Discovery Board, as part of my project i need to enable USB OTG Port as CD C Class. Could some one help me in fining any example for USB OTG CDC Class for STM32L476 Discovery Board. I found an example for STM32L476 Eval board Can i use the same Application Example for Discovery Board also. Please help me out in finding the solution.

10 REPLIES 10

I added some code to the while(1) loop in the example main so that it writes a message every couple of seconds. I built, downloaded and ran it on my target, and am able to see the messages using a terminal app on my PC. However, I would like to add a loopback feature to read characters typed in the terminal app and write them back. I'm using the CDC_Transmit_FS function to do the writes. But I'm not able to use the CDC_Receive_FS function for the reads because it's declared static in usbd_cdc_ifc.c and is not declared in usb_cdc_if.h. Is there a different public function that I should be using for the reads ? Thanks.