cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4xxx FW v1.5.0 : blocked in main.c/HAL_init() because IRQ handler not configured by SystemInit()

FDESS.2
Associate II

There is an issue in STM32G4 MCU FW package v1.5.0 in system_stm32g4xx.c ligne 189 :

#if defined(USER_VECT_TAB_ADDRESS)
  SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
#endif /* USER_VECT_TAB_ADDRESS */

there is no #else, so SCB->VTOR is not initialised if USER_VECT_TAB_ADDRESS is not defined.

As a result, main.c stay blocked in HAL_Init() when setting systick IRQ, or systick IRQ (and none other IRQ) are called.

To fixe that, code should be replaced by something like that :

#ifdef USER_VECT_TAB_ADDRESS
  SCB->VTOR = USER_VECT_TAB_ADDRESS| VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
#else
  SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
#endif

1 ACCEPTED SOLUTION

Accepted Solutions
Sara BEN HADJ YAHYA
ST Employee

Hello @FDESS.2​ ,

Thanks for your feedback,

As @TDK​  mentioned the change was intended and deployed on all STM32 series.

For more details please check this thread STM32CubeIDE 1.7, MCU package L4 Series 1.17 : VTOR is not initialized

If you issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

View solution in original post

3 REPLIES 3
TDK
Guru

I believe this was previously declared as "intended" in a post by ST. Will reply if I can find it.

If you feel a post has answered your question, please click "Accept as Solution".
Sara BEN HADJ YAHYA
ST Employee

Hello @FDESS.2​ ,

Thanks for your feedback,

As @TDK​  mentioned the change was intended and deployed on all STM32 series.

For more details please check this thread STM32CubeIDE 1.7, MCU package L4 Series 1.17 : VTOR is not initialized

If you issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

FDESS.2
Associate II

Thank you, it is all OK,

best regards,

Fabien.