However, I am able to start the timer. This can be confirmed as the Timer4 ISR is hit. But I can't stop the timer. If I call my function with enable=false the Timer 4 ISR is still getting triggered.
Am I missing a dedicated procedure for disabling a timer?
Best regards,
Todor
Discussion Forums
8-bit MCUs
Answered
Answered
Hi,
Keep it simple:
TMR4CN0 &= ~TMR4CN0_TR4__RUN;
TMR4CN0_TR4__STOP is defines as 0x00.
You cannot "or" with a "0", nothing will happen, you have to "and" it. then you can turn the bit to "0".
Disable EFM8UB1 Timer4
Hello,
I have a rather dumb problem. For my application I need to enable/disable Timer 4 at the EFM8UB1 via firmware.
The code for contorlling the timer is rather simple, as shown below.
However, I am able to start the timer. This can be confirmed as the Timer4 ISR is hit. But I can't stop the timer. If I call my function with enable=false the Timer 4 ISR is still getting triggered.
Am I missing a dedicated procedure for disabling a timer?
Best regards,
Todor
Hi,
Keep it simple:
TMR4CN0 &= ~TMR4CN0_TR4__RUN;
TMR4CN0_TR4__STOP is defines as 0x00.
You cannot "or" with a "0", nothing will happen, you have to "and" it. then you can turn the bit to "0".
regards Karl
How about this?
Thank you ver much!
Sometimes I wonder how I got my masters degree...