2020-09-15 04:06 AM
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?
2020-09-15 05:08 AM
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