cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F3 Interrupt and timers

kim
Associate
Posted on June 21, 2018 at 10:56

I am running STM32F303VC.

I require an IRQ on GPIOE_Pin_15  ---> TIM2_Channel_1

My typical Frequency range is from 5 Hz - 500Hz

This is required to provide me with a number of ticks between the 2 interrupts.  The result is then passed to TIM3 /100

PreScaler   = Same for both timers

TIM2_Period = 1

TIM3_Period = Result / 100

TIM3 then provides me with 100 points between the original to trigger other events an certain points.

The problem I am having is the IRQ_Handlers do not get triggered.

I have monitored the GPIO_Pin_15 through a while loop and confirm this is toggling, however TIM2 doe not update TIM3 and TIM3 does NOT output either.

I can provide my Main.C file if you email me

mailto:kim@accesssecurity.co.nz

#stm32f3 #timer-interrupt
3 REPLIES 3
Posted on June 21, 2018 at 17:01

The problem I am having is the IRQ_Handlers do not get triggered.

Read back the content of relevant GPIO and TIM (and NVIC) registers and

- check if AF is set for given pin in GPIO_MODER

- check if the proper AF is selected in GPIO_AFRL/AFRH

- check if input capture is set in TIMx_CCMRy

- check if channel enabled in TIMx_ENR

- check if interrupt for that channel enabled in TIMx_DIER

- check if interrupt for that timer is enabled in NVIC

- check if the ISR name matches that in the vector/startup file(keep in mind name mangling if you compile as C++) (check in disassembled binary perhaps)

JW

henry.dick
Senior II
Posted on June 21, 2018 at 17:09

'

The problem I am having is the IRQ_Handlers do not get triggered.'

yeah. but the problem isn't with your code. so look somewhere else, please.

Posted on June 21, 2018 at 20:02

Indeed, there's no such AF on that pin... I didn't realize the OP didn't care to check...

JW