2022-01-05 07:23 AM
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
Solved! Go to Solution.
2022-01-06 04:19 AM
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.
2022-01-05 07:58 AM
I believe this was previously declared as "intended" in a post by ST. Will reply if I can find it.
2022-01-06 04:19 AM
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.
2022-01-06 05:01 AM
Thank you, it is all OK,
best regards,
Fabien.