cancel
Showing results for 
Search instead for 
Did you mean: 

[Bug] STM32Cube - HardFault handler has wrong name

vincenthamp9
Associate III
Posted on January 17, 2016 at 17:37

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 called

void 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
3 REPLIES 3
Nesrine M_O
Lead II
Posted on January 18, 2016 at 10:21

 Hi Vinci,

 

 

Thanks for highlighting this issue. It is already tracked and reported internally 

 

 

-Syrine –
eraserbm
Associate
Posted on February 24, 2016 at 11:15

Hi,

also in STM32F7 firmware package (V1.3.1/stm32f7xx_it.c).

Greetings,

Matthias

stm32cube-t
Senior III
Posted on March 22, 2016 at 19:26

Dear user,

the problem is now fixed in STM32CubeMX 4.14.