cancel
Showing results for 
Search instead for 
Did you mean: 

How to define internal inerrupt?

Ala
Senior

Hey there, I'm using a stm32f103c8. I want to define an internal interrupt so for example when a counter reaches a certain value, the event happens and the interrupt performes. how should I do that?

1 REPLY 1

There is technical documentation for the part and programming manuals.

The startup.s file should ​have a list of interrupt sources. For a timer these are usually in the for TIMx_IRQHandler, but if they break out the counter compare to its own interrupt you can find TIMx_CCx_IRQHandler

​Enable in the NVIC to have it call the handler.

Enable​ in the TIM for a CCx interrupt and set the TIMx->CCRx to the comparison value.

Look at TIM examples in CubeF1 trees​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..