AnsweredAssumed Answered

STM32F746ZGTx DWT Issue

Question asked by fernandez.victor on Mar 17, 2016
Latest reply on Mar 17, 2016 by fernandez.victor
Hi,

I'm trying to get the value of the CYCCNT in a STM32F746 Nucleo Board. Code is as follows:

01.// Configuring DEMCR & CTRL registers
02. 
03.CoreDebug->DEMCR &= ~0x01000000;
04.CoreDebug->DEMCR |= 0x01000000;
05. 
06.DWT->CTRL &= ~0x00000001;
07.DWT->CTRL |= 0x00000001;
08.DWT->CYCCNT = 0;
09. 
10.//Do something...
11. 
12.uint32_t Count = DWT->CYCCNT;

Registers were not written, and Count is always zero. 

Has anyone faced a similar issue?

I employ the same code for Cortex M4 STM32F4xx MCUs, and it works perfect!

Thanks,

Outcomes