STMicroelectronics / STM32CubeL0

STM32Cube MCU Full Package for the STM32L0 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
103 stars 57 forks source link

IS_LPTIM_PERIOD() lower value should be 0 #33

Open DaniAtGH opened 9 months ago

DaniAtGH commented 9 months ago

The Period start value has changed from 0 to 1 in the macro IS_LPTIM_PERIOD(). In my opinion the lowest autoreload value should be 0. I have tested a 1s period with the external LSE clock 32,768kHz and STM32L071CB: Timeout = 0x7FFF, due to processor errata = 0x7FFE, HAL_LPTIM_TimeOut_Start_IT(&lptimHandle, 1U, 0x7FFEU)). The LPTIM interrupt is raised every 999,95ms and before (with the HAL version 1.10.5) every 999,99ms (HAL_LPTIM_TimeOut_Start_IT(&lptimHandle, 0U, 0x7FFEU)). Same issue is also in STM32CubeL4.