Skip to main content
WPong.1
Associate II
July 6, 2024
Question

CPU Halted while looping send data by using USB CDC

  • July 6, 2024
  • 1 reply
  • 758 views

Hi, Everyone

I use STM32F103C8T6 send data by using USB CDC. After flash program, application can run properly but after random minute(Not exceed 15 minute) I found that CPU halted.

In while loop just blink LED and send data by USB CDC

My question is what can cause CPU halted and what I should inspect first.

 

Thank you for answer and sorry for my English.

This topic has been closed for replies.

1 reply

gbm
Super User
July 6, 2024

You should inspect your code, of which we know exactly nothing.

If, by any chance, you use ST HAL-based USB device stack, sending data from the event loop causes the USB stack to hang. Search the forum for (many) topics on that matter.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice