2020-03-03 10:46 PM
2020-03-04 01:18 AM
No, you can't do this on LPTIM, CNT is read only and there appears to be no mechanism to modify it except that it clears when it matches ARR.
While CMP and ARR can be changed on the fly, I'm not sure what's the consequence of setting either of them *at*, or even *below* current CNT.
JW
2020-03-04 06:38 AM
I haven't used LPTIM, but observed behavior with TIMx (L0/L4 series) was that setting CCR==CNT triggered an immediate compare event (interrupt). I remember since that wasn't what I wanted it to do. I never did find chapter-and-verse for that behavior.
2020-03-04 07:19 AM
Thanks for sharing this detail, @mckenney .
The LPTIM in the very details appears to be quite different from TIM, though.
JW