2016-01-17 08:37 AM
Hello
I'd like to report a bug with the current version of STM32CubeMX 4.0 and the F4 libraries 1.1 concerning the code generation. Currently if the user enables the hard fault interrupt the generation tools creates a void function calledvoid HardFault_IRQHandler(void)
{
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
{
}
/* USER CODE BEGIN HardFault_IRQn 1 */
/* USER CODE END HardFault_IRQn 1 */
}
But whoever wrote that code clearly didn't pay any attention to the name convention of the vectors in the startup files
g_pfnVectors:
.word _estack
.word Reset_Handler
.word NMI_Handler
.word HardFault_Handler
.word MemManage_Handler
.word BusFault_Handler
.word UsageFault_Handler
.word 0
.word 0
.word 0
.word 0
.word SVC_Handler
.word DebugMon_Handler
.word 0
.word PendSV_Handler
.word SysTick_Handler
So even if a hard fault occurs the code would still only enter the handler defined as default according to the startup code, not the actual hard fault handler.
Please change either of those two, preferably the one from the code generation tool since the ''IRQ''-prefix is confusing.
I guess other libraries are affected as well.
Best regards
2016-01-18 01:21 AM
Hi Vinci,
Thanks for highlighting this issue. It is already tracked and reported internally
-Syrine –
2016-02-24 02:15 AM
Hi,
also in STM32F7 firmware package (V1.3.1/stm32f7xx_it.c).Greetings,Matthias2016-03-22 11:26 AM
Dear user,
the problem is now fixed in STM32CubeMX 4.14.