AnsweredAssumed Answered

Timer 1 Channel 4 -Compare interrupt problem

Question asked by field.rob on Jan 30, 2018
Latest reply on Jan 30, 2018 by field.rob

Trouble getting capture compare ( no output ) interrupt to function correctly.

First.. I'm using HAL, with the free Keil MDK. Maybe this is the problem, so first question:

Is there any simple Keil examples that like Blinky that also don't force an RTOS on me?

Trying to generate a basic Keil project seemed to invole HAL when I requested  startup code to be generated.


Back to the main problem,  using Timer 1 Channel 4. I want no output, just the Compare to generate an interrupt.

The timer will re restarted by an external interrupt.

The only thing that happens is the CC interrupt seems to fire at the counter end ( if left to continue without resetting )4or it fired when the external int restarts the counter.

The CC interrupt seems to fire correctly only once ( count matches compare)  after a program reset. from then on the compare value doesn't seem to do anything ( yet the CC interrupt triggers - at the count end)