cancel
Showing results for 
Search instead for 
Did you mean: 

Timer adapted to HAL Standards from previous code

ignasi
Associate II
Posted on December 14, 2017 at 12:42

Hi,

I'm trying to adapt the following code, from previous versions, to HAL Cubemx standards :

void TIM1_CC_IRQHandler(void)

{

uint32_t break_time, mab_time;

TIM_ClearITPendingBit(TIM1, TIM_IT_CC1);

break_time = TIM_GetCapture2(TIM1);

mab_time = TIM_GetCapture1(TIM1) - break_time;

/* use some tolerance for times */

if (break_time > 80 && break_time < 10e3 && mab_time > 8) {

start_flag = 1;

TIM_ITConfig(TIM1, TIM_IT_CC1, DISABLE);

}

}

So far, the functions on the timer are not accepted on HAL, and I couldn't see anything about TIM_ITConfig on the documentation

Do you have any idea?

Thank you in advance

ip

0 REPLIES 0