cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F401 discovery - USB CDC not working

gkovelman
Associate II
Posted on March 15, 2016 at 18:17

Hi,

I'm trying to get USB CDC to work.

The sample project with USB CDC works and it outputs Hello\r\n, however, when I've added additional tasks and I2C usage, the application is stuck inside in an infinite loop inside CDC_Transmit_FS function.

The board is stm32f401 discovery.

What can I check to see what's wrong?

Thanks
1 REPLY 1
gkovelman
Associate II
Posted on March 30, 2016 at 15:58

For those that encounter the same problem, this came from the USBD_malloc in usbd_cdc.c. As I'm using only CDC, I've modified malloc to a reference to a static variable. It works now.