cancel
Showing results for 
Search instead for 
Did you mean: 

Why is my STM32 TIM16 interrupt speed not changing when I change the APB2DIV?

msche.1
Associate III

I'm building an elf file, SCPing it to the controller and using the fw_cortex_m4.sh to load it on the m4, but no matter what I set the APB2DIV scaler to the number of times per second TIM16 is called doesn't change.

The only thing that does seem to affect the frequency is the prescaler on the TIM16 pin, but I've already got it set to 0 and I only get about 1.4kH.

2 REPLIES 2
KnarfB
Principal III

APB2DIV is part of RCC and can influence more than just TIM16. The system is probavbly not configured to let the M4 do that.

hth

KnarfB

Thanks for your answer, the problem turned out to be that I was counting the amount of times the ADC callback was hit not the timer counting.