Activate cache

This commit is contained in:
Julien Chevalley
2023-12-11 15:07:16 +01:00
parent 902141e8b6
commit a9c0f1b148
15 changed files with 1927 additions and 1775 deletions

View File

@ -21,6 +21,7 @@
#include "spi.h"
#include "gpio.h"
#include "../../nokia.h"
#include <stdio.h>
extern void ScreenSaver(void);
@ -94,16 +95,31 @@ int main(void)
Nokia_Init();
uint32_t oldTick=HAL_GetTick();
uint32_t newTick=oldTick;
uint32_t fps=0;
SCB_EnableICache();
SCB_EnableDCache();
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1) {
newTick=HAL_GetTick();
if(newTick-oldTick>1000)
{
oldTick=newTick;
printf("FPS: %d\r\n",fps);
fps=0;
}
ScreenSaver();
NokiaUpdate();
fps++;
/* USER CODE END WHILE */