2022-10-24 03:40 AM
On the STM32U5xx, ST decided to keep this interpretation of "match". It is present on other chips as well, see
This has the side effects that
2022-10-24 05:37 AM
Are you sure it's not >= ?
The LPTIM documentation is, well, lacking.
JW
2022-10-24 06:29 AM
@Community member
I've made a test and the result was stable. In my case, the LPTIM is clocked from 32768 Hz watch crystal, in a simple up counter configuration with ARR at 0xffff (the init code is ugly, so I did not post it).
In the ISR, I've recorded the CNT and CCR values, and it was always CNT > CCR, e.g. CCR = 0x8001 and the ISR was triggered at CNT 0x8002. It takes about 1.25us to enter the ISR, so with 30.5us before the next tick: yes, I'm sure. It also fits the description in the provided link. The link also mentions a silicon bug, which blocks the MCU at the entrance of the ISR until CNT > CCR, so for ~ 1 tick (30.5us). I've not checked whether this bug is present on the STM32U5xx.
2022-10-24 07:19 AM
Thanks.
JW