Skip to main content
Associate II
March 20, 2024
Question

STM32U575xx CYCCNT does not change, even with CYCCNTENA=1

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

Tesla DeLorean
Guru
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?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
ClaudeAuthor
Associate II
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.