2017-10-14 02:43 PM
Problem occurs because TIM6 dedicated to incrementing SysTick in stm32l4xx_hal_timebase_tim.c and uses same callback function.
Hal
2017-10-14 04:51 PM
It is provided as a template, modify the function to check for the htim value, and run your code when appropriate.
2017-10-15 07:14 AM
Thanks, Clive1. It was much simpler when you knew which timer triggered the interrupt. And you could test for the most critical interrupt event first.
Hal
2017-10-15 11:12 AM
the callback passes you a handle to whichever timer caused the interrupt.
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
if (htim->Instance == TIM6)
{
do tim6 stuff
}
if (htim->Instance == TIM7)
{
do tim7 stuff
}
}�?�?�?�?�?�?�?�?�?�?�?�?�?