Question
STM32F767ZI Nucleo board works from Flash on ITCM slower if ART is on
I detected that ART accelerator and prefetch is not enabled.
Why for loop gets slower if if I switch both on ?
/* USER CODE BEGIN SysInit */
#if defined(FLASH_ART_ON)
// enable ART for Flash (x8 Booster)
int FLASH_ACR_REG=0;
volatile unsigned int *FLASH_ACR = (volatile unsigned int *)0x40023C00;
FLASH_ACR_REG = *FLASH_ACR;
//FLASH_ACR_REG = 0; //zero wait states (broken)
FLASH_ACR_REG = FLASH_ACR_REG | (3<<8);
*FLASH_ACR = FLASH_ACR_REG;
#endif
// Benchmark
int i=0;
volatile z=0;
volatile unsigned int *DWT_CYCCNT = (volatile unsigned int *)0xE0001004;
CcountFLASHstart = *DWT_CYCCNT;
for (i;i<1000;i++){
#if defined(REGISTER_BM) //internal register benchmark
z=i;
#else //C7 peripheral to globale variable (SRAM)
CcountFLASHstop = *DWT_CYCCNT;
#endif
}
CcountFLASHstop = *DWT_CYCCNT;
/* USER CODE END SysInit */