cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U575xx CYCCNT does not change, even with CYCCNTENA=1

Claude
Associate III

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

2 REPLIES 2

>>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
Up vote any posts that you find helpful, it shows what's working..
Claude
Associate III

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.