2024-03-20 01:10 PM
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
2024-03-20 01:46 PM
>>I must be missing something
The LAR ?
Perhaps you can find a free 16 or 32-bit TIM you can free-run?
2024-03-20 02:11 PM
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.