Showing results for 
Search instead for 
Did you mean: 

I am using STM32G0 MCU in a new project. I would like to know if is possible to use a LPTIM in free running mode and read the counter value just like a time stamp. I intented to use the reading for measuring the time between two isrs. BR Gilberto

Associate III
Lead II

Read the Reference Manual section on the LPTIM - you will find there all the info you need.


Have a look at IRQ self settle source file in this project which takes a snapshot when entering and learing an ISR using a timer, because DBG cycle counter resource is missing in cortex M0+

ST Employee

Hi @GErma.1​ 

Indeed, you need to enable continuous mode as referenced in the reference manual and AN4865

The LPTIM output depends on the continuous comparison between the LPTIM counter and the LPTIM_CMP (or LPTIM_CCRx) values.

When your question is answered, please close this topic by choosing Select as Best the answer that answered your question or solved your problem. This will help other users find that answer faster. 


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.