Skip to main content
Graduate
March 20, 2024
Question

STM32U575xx CYCCNT does not change, even with CYCCNTENA=1

  • March 20, 2024
  • 2 replies
  • 664 views

I am trying to make a sleep function that accepts a uint16_t argumentin microsecond.

I wanted to use DWT->CYCCNT, but it seems the counter remains frozen.

Obviously, I read the DWT_CTRL_CYCCNTENA_Pos from ->CTRL and the bit is set, therefore enabled.

I must be missing something

    This topic has been closed for replies.

    2 replies

    Graduate II
    March 20, 2024

    >>I must be missing something

    The LAR ?

    Perhaps you can find a free 16 or 32-bit TIM you can free-run?

    ClaudeAuthor
    Graduate
    March 20, 2024

    I'll look-up the LAR register, thanks for the tip.

    I do have free timers, but the product I am working on already had EMC EMI performed, I wouldn't want to add a timer if I could avoid it Thank you.