2020-07-19 06:47 AM
Hi, I have never work with register. I need to restart counter of LPTIM in stm32l431. The documentation says that I need to set a register to '1'. The image explain this. How I can do that? Thank's a lot.
2020-07-19 07:05 AM
Look at the LPTIM_CR.RSTARE bit
LPTIM1->CR |= (1 << 4); // RSTATE
rdcnt = LPTIM1->CNT; // Now implicitly clears, ie reads current value and resets
Presumably LPTIM1->CNT = 0 would work too.
2020-07-19 12:54 PM
Doesn't appear to be avalable on 'L431.
JW