2018-10-25 11:20 PM
Hello, I can`t figure out how to achieve the following with STM32Cube HAL.
I need to setup a timer, that counts to a specific value and generate an Interrupt. After this, the timer needs to keep counting up, until it overflows. This Overflow should alos generate an Interrupt. I can`t figure out, how to do this. I also tried PWM -no output but it is not working. I don`t want to set a GPIO, I only need a Timer that acts like a PWM. Count to a value -> Interrupt, keep counting till overflow-Interrupt.
Thanks
2018-10-26 12:10 PM
Normally, you would set both TIMx_DIER.UIE and one or more of the TIMx_DIER.CCxIE. Then in the ISR, you'd need to check the source of interrupt in TIMx_SR, clear it and act upon it as you need.
I don't Cube.
JW