cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H503 DWT problem with PRODUCT STATE == 72

Mike1992
Associate III

Friends, hello, I encountered a problem with starting DWT with PRODUСT STATE = 72;
I measure the time between pulses (white beam of the logic analyzer) by the EXTI5 interrupt input (falling edge of the signal), TIME_LONG_SENS = DWT->CYCCNT / (SystemCoreClock / 1000000); and then reset the counter DWT->CYCCNT = 0U; I measured the number of pulses on the generator and the number of interrupts on the input, they are equal. Then after a certain delay I control the microcontroller output to send a pulse (red and yellow beams of the logic analyzer).
The problem is that after zeroing DWT in the PRODUСT STATE = 72 state,

Mike1992_0-1753806135140.png

One output pulse is skipped.

it does not always start and upon arrival of the next interrupt, the DWT->CYCCNT value is zero, and accordingly, the measured time is also zero.
If I set PRODUСT STATE = ED,

Mike1992_1-1753806184171.png

 

then this problem does not occur and the same code works correctly.
Please tell me what my problem is and how to solve it?

0 REPLIES 0