Skip to main content
Associate
February 3, 2025
Solved

STM32H7 LPTIM compare mode

  • February 3, 2025
  • 2 replies
  • 544 views

Hi, I use STM32CubeMX 6.10.0 and I have a STM32H7 CPU.

The LPTIM is a frequency counter that can give an ISR when the

counter reached a specified value; after reaching this value it starts

again from zero (ARR mode), or it continues towards the max value

on 16 bits and then starts again from zero (CMP mode)

My question is: can I configure from CubeMX this LPTIM in CMP mode?

To me it seems there is no settings for this, whatever I do it's still in ARR mode ..

the solution would be to make manual code changes ?

 

This topic has been closed for replies.
Best answer by Saket_Om

Hello @catalin78 

For your application you can just set the mode to "Counts internal clock event".

Saket_Om_0-1738682249588.png

 

 

2 replies

Saket_OmBest answer
ST Technical Moderator
February 4, 2025

Hello @catalin78 

For your application you can just set the mode to "Counts internal clock event".

Saket_Om_0-1738682249588.png

 

 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
catalin78Author
Associate
February 4, 2025

yes, this is my setting. It didn't generate exactly the code I needed, but I found a solution changing some user code defined sections (cause my problem was that initially i modified generated code)