cancel
Showing results for 
Search instead for 
Did you mean: 

LPTIMx_CMP interrupt on STM32L476

angeletti
Associate II
Posted on November 17, 2015 at 20:07

I'm trying to generate an interrupt on compare match of LowPower Timer. No luck until now, I tried everything using the HAL libraries, the AutoReload interrupt is correctly generated but not the compare match. Anyone succedeed in this?

Regards,

Fabio

#lptim #stm32l476 #stm32
1 REPLY 1
Amel NASRI
ST Employee
Posted on November 26, 2015 at 16:53

Hi Fabio_IT,

You have the example STM32Cube_FW_L4_V1.1.0\Projects\STM32L476G_EVAL\Examples\LPTIM\LPTIM_PulseCounter.

In this example, there is an auto-reload each time the counter reaches the maximum value.

You can update this example to use compare match interrupt instead of autoreload match interrupt. The behavior with each interrupt is managed in HAL_LPTIM_IRQHandler. You will need to implement your own CallBack functions.

Hope this example bring you some help.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.