LPTIM1 STM32L476RG (nucleo)??
I am trying to create a 50ms timer using the above reference. The clock is 16MHz, I have a divisor of 16 and have the NVIC enabled (all this is done in cubeMX). I have the following ISR
void HAL_LPTIM_AutoReloadMatchCallback(LPTIM_HandleTypeDef *hlptim)
{
hlptim1.Instance->ISR |= (LPTIM_ICR_ARRMCF | LPTIM_ICR_CMPMCF);
}Prior to the while 1 loop I call:
HAL_LPTIM_Counter_Start_IT(&hlptim1, 50000);It doesn't appear to me to be working correctly.....At start up I get into the ISR and count is way less than it should be....Can someone tell me what I am doing wrong? This should be pretty simple as I just want the timer to count to 50ms (using 16mhz with /16) and every time it rolls generate an IRQ....
