AnsweredAssumed Answered

Some question  about DWT working on the stm32F767

Question asked by yuanfu xie on May 30, 2018
Latest reply on May 30, 2018 by yuanfu xie

I am using the STM32F7-Discovery board and have been stuck at trying to enable the DWT cycle ,From what I've seen online this should suffice for enabling it:

#define DWT_CR *((volatile unsigned int *)0xE0001000)
#define DWT_CYCCNT *((volatile unsigned int *)0xE0001004)
#define DEM_CR *((volatile unsigned int *)0xE000EDFC)

#define DBGMCU_CR *((volatile unsigned int *)0xE0042004)
#define ITM_LAR *((volatile unsigned int *)0xE0000FB0)

#define DEM_CR_TRCENA (1 << 24)
#define DWT_CR_CYCCNTENA (1 << 0)

 

void bsp_DWT_Init(void)
{
//ITM_LAR = 0xC5ACCE55;
DEM_CR |= (unsigned int)DEM_CR_TRCENA; /* Enable Cortex-M4's DWT CYCCNT reg. */
//ITM_LAR = 0xC5ACCE55;
DWT_CYCCNT = (unsigned int)0u;
DWT_CR |= (unsigned int)DWT_CR_CYCCNTENA;
}

 

 

Infact ,the programs above  work well  on the stm32F4 serials.but not on the stm32F7serials .why? 

Outcomes