Skip to main content
gkovelman
Associate II
March 15, 2016
Question

STM32F401 discovery - USB CDC not working

  • March 15, 2016
  • 1 reply
  • 610 views
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
    This topic has been closed for replies.

    1 reply

    gkovelman
    gkovelmanAuthor
    Associate II
    March 30, 2016
    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.