USB CDC example crashes
Posted: Mon Aug 14, 2017 11:23 pm
Hi,
I'm trying to run the (unmodified) example in testhal/STM32/STM32F0xx/USB_CDC on my STM32F072B-Discovery.
The code is from svn r10430, compiler is arm-none-eabi-gcc 7.1.0.
I'm able to flash the controller and run the code and I can also connect to the board and use the terminal, but after maybe
10-20 seconds, the board stops responding. According to GDB, it is in _unhandled_exception(void) and I get no meaningful backtrace.
Observations so far:
-The crash only happens when the USB cable is connected, otherwise it runs fine (but then it's kind of pointless...)
-I see no USB packets in wireshark related to the crash, it even crashes when no terminal is connected and then I only see the initial enumeration.
-When connecting a terminal, I see weird packets from the device to the host which wireshark identifes as Ethernet II. I'm not sure if this is normal for CDC, but it looks suspicious.
I'm trying to run the (unmodified) example in testhal/STM32/STM32F0xx/USB_CDC on my STM32F072B-Discovery.
The code is from svn r10430, compiler is arm-none-eabi-gcc 7.1.0.
I'm able to flash the controller and run the code and I can also connect to the board and use the terminal, but after maybe
10-20 seconds, the board stops responding. According to GDB, it is in _unhandled_exception(void) and I get no meaningful backtrace.
Observations so far:
-The crash only happens when the USB cable is connected, otherwise it runs fine (but then it's kind of pointless...)
-I see no USB packets in wireshark related to the crash, it even crashes when no terminal is connected and then I only see the initial enumeration.
-When connecting a terminal, I see weird packets from the device to the host which wireshark identifes as Ethernet II. I'm not sure if this is normal for CDC, but it looks suspicious.