cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC not working when FSMC is enabled on STM32F412 (CubeMX)

Posted on June 06, 2018 at 16:00

Hi,

I have a simple custom PCB which drives a TFT controller via 8 bit FSMC. It works well.

When I add the USB CDC I get hard fault after ~1 sec run even without any USB transmission.

I used CubeMX to generate the code. Finally I didn't add any user code and experienced that when I comment 'MX_USB_DEVICE_Init' or 'MX_USB_DEVICE_Init' I don't get hard fault.

Have you ever experienced something like this?

Environment details:

- CubeMX v 4.26.0

- MCU: STM32F412RG

- SW4STM32 IDE

Than you in advance!

Gabor

#usb-cdc #stm32f4 #cubemx #fsmc #hard-fault
1 REPLY 1
Jan Waclawek
Senior II
Posted on June 06, 2018 at 22:32

This may be coincidental, e.g. insufficient stack.

Debug starting from the hardfault to find the culprit.

JW