2016-04-28 01:17 AM
I created a simple project using STCubeMX for my nucleo-f446ZE(STM32F446ZET6).
The project should be a USB device HID but it fail to start. After messing around with the debugger, I discovered that the MCU PC register go to 0x00000000 or 0xFFFFFFFF or sometimes random invalid value.
I didn't modify any code. I compiled the code with MDK-ARM (modified GCC, Vision IDE), and with GCC (openSTM32) and the same thing happen.
Callstack :
Ps: RAM got corrupted after 0x080149A and that why the program do weird stuff Image
#stm32f4-nucleo-f446-stcubemx-hal2016-04-28 03:45 AM
Hi none.thomas,
I recommend you also to have a look to the USB examples under the STM32F4 cube firmware package: STM32Cube_FW_F4_V1.11.0\Projects\STM32446E_EVAL\Applications\USB_Device\HID_Standalone : This application is a part of the USB Device Library package using STM32Cube firmware. It describes how to use USB device application based on the Human Interface (HID) on the STM32F446xx devices.For more details about the STM32Cube USB Device library, please refer to UM1734 ''STM32Cube USB Device library''.-Syrine –2016-04-28 06:15 AM
Not sure there is enough detail to make any kind of diagnosis.
I would check the stack configuration, and PLL/FLASH settings. See if turning off optimization changes the failure.What exactly gets corrupted in RAM, ie what is supposed to be, and what gets written instead.2016-04-29 12:28 AM
Misconfiguration of PLL set has SYSCLK later corrupt data in rom and ram.
The solution is here :http://stackoverflow.com/questions/36908369/hal-gettick-crash-mcu/36909221
Thank you for your help