cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-L412KB : USB-CDC Initial FAIL

ARats
Associate

I have try to use the USB-VCP (Virtual COM Port) on the STM32L412KB (32-pin) but I have an issue that the code which is generated from the CubeMX got stuck at MX_USB_DEVICE_Init() and I try to debug in the Atollic TrueStudio, it causes the hard fault on HAL_PCD_init() function in USBD_Init process.

Issue: MX_USB_DEVICE_Init() got stuck

MCU: STM32L412KB (NUCLEO-32 Board)

Firmware Package Name and Version: STM32Cube FW_L4 V1.13.0

CubeMX version 5.1.0

Toolchain/IDE: Atollic TrueStudio Version 9.1.0

Please suggest, thank you very much.

P.S. I have used the USB-VCP via CubeMX on the another chip such STM32F072, STM32L053, STM32L476 with no problem.

12 REPLIES 12

This is not related to CubeMX, but to CubeL4 (which in Cube lingo may be known as "firmware"). The bug is present in v1.14, and AFAIK there's no newer version so far.

https://community.st.com/s/question/0D50X0000Az372YSQQ/stm32l412-hardfault-while-using-minimal-cubeide-example

JW

dbgarasiya
Senior II

could be hardware error.or pin mismatched