HAL_LPTIM_Counter_Start_IT returning HAL_TIMEOUT
Hi. I am using STM32L412KBTx for my application. I am using LPTIM for 150ms and 5s timings.
The pattern is like 150ms-->5s-->150ms whenever data is received over LPUART.
So, for first 150ms timeout value, it runs fine and when I start for 5s timeout value, it returns HAL_TIMEOUT.
(NOTE: I stop tier before starting again)
Below is the code from stm32l4xx_hal_lptim.c where i returns HAL_TIMEOUT:
/* Wait for the completion of the write operation to the LPTIM_ARR register */
if (LPTIM_WaitForFlag(hlptim, LPTIM_FLAG_ARROK) == HAL_TIMEOUT)
{
return HAL_TIMEOUT;
}Here are the screenshots of LPTIM registers:



Any Idea what is happening and how can I solve it?
