Having issues with using simultaneous timers [STM32]

by Xavier Pacheco Paulino   Last Updated October 17, 2018 14:25 PM

In my nucleo L432KC, I have set Timer 1 for PWM generation, Timer 15 as a timer based interrupt and Timer 2 as PWM input mode. Timer 1 and Timer 15 works well until a point. My clock frequency is 2MHz. For example, I wanted a 50 kHz update event, so I set Timer 15 Precaler 0 and period 39. In that case, While(1) loop never executes, i.e, the program hangs.

When I start timer 2 as:

HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_3);

HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_4);

My timer 1 misbehaves. The program in general misbehaves. What could be happening here? It's like Timer 15 interrupt is taking all the control? Is something related with interrupts priorities?

Tags : stm32

Related Questions


Updated March 26, 2015 13:08 PM

SPI to USB converter Question (for STM32F105)

Updated March 28, 2015 06:08 AM

STM32 SWD Issue

Updated April 08, 2015 22:10 PM