cancel
Showing results for 
Search instead for 
Did you mean: 

Timer issue

rohitkumarkv07
Associate III

Dear all

I have configured three timers TIM2,TIM3 and TIM4 

NVIC_SetPriority(TIM2_IRQn, 0x00);

NVIC_EnableIRQ(TIM2_IRQn);

NVIC_SetVector(TIM2_IRQn, (uint32_t)&TIM2_IRQ_Handler);

 

NVIC_SetPriority(TIM3_IRQn, 0x00);

NVIC_EnableIRQ(TIM3_IRQn);

NVIC_SetVector(TIM3_IRQn, (uint32_t)&TIM3_IRQ_Handler);

/* NVIC_SetPriority(TIM4_IRQn, 0x00);

NVIC_EnableIRQ(TIM4_IRQn);

NVIC_SetVector(TIM4_IRQn, (uint32_t)&TIM4_IRQ_Handler);

But Issue I am facing that only two timers are running at one time with

same and with different priorities TIM2 and TIM4(running with different priorities)

(TIM2 and TIM3 are running with same priorities) .

help me where I am wrong

B.R

Rohit

1 REPLY 1
TDK
Guru

What is the interrupt rate of each timer? You will be limited to tens of kHz interrupts in general, although you can push this higher with more efficient code. My guess is you are asking too much out of the cpu and it is unable to complete on ISR before the next one triggers.

 

(It is not typical to call NVIC_SetVector at all. Typically one uses the name of the ISR in the vector table and the linker will take care of it.)

If you feel a post has answered your question, please click "Accept as Solution".