Skip to main content
Visitor II
February 3, 2025
Solved

STM32H7 LPTIM compare mode

  • February 3, 2025
  • 1 reply
  • 521 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

     

     

    1 reply

    Saket_OmAnswer
    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

     

     

    catalin78Author
    Visitor II
    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)