Question
STMHAL STM32L152RETx - If you use TIM2 as the timebase source, it will assert in HAL_NVIC_SetPriority() due to uwTickPrio not being set in the TIM2 version of HAL_InitTick()
I set TIM2 as the timebase and then enabled full hal assertion via STM32cube.
It asserted in ../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_cortex.c:197
Stack trace:
Thread #1 (Suspended : Signal : SIGINT:Interrupt)
assert_failed() at main.c:455 0x8002ff4
HAL_NVIC_SetPriority() at stm32l1xx_hal_cortex.c:197 0x8000782
HAL_InitTick() at stm32l1xx_hal_timebase_tim.c:50 0x80030ca
HAL_RCC_ClockConfig() at stm32l1xx_hal_rcc.c:956 0x8001546
SystemClock_Config() at main.c:279 0x8002f40
main() at main.c:185 0x8002f54I think it's because HAL_InitTick() in .../Src/stm32l1xx_hal_timebase_tim.c does not set uwTickPrio unlike the original in .../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal.c