#include "stdio.h" #include #include int ch1,ch2; #define core_num 0 #define MPAXL2 0x08000010 #define MPAXH2 0x08000014 void main() { volatile int *ptr; volatile unsigned int * mpaxl2 = (volatile unsigned int *)MPAXL2; volatile unsigned int * mpaxh2 = (volatile unsigned int *)MPAXH2; unsigned int st_bef[50]={0}; unsigned int st_aft[50]={0}; unsigned int value; int i = 0, j = 0; Cache_Size *size; Cache_getSize(size); ptr = (volatile unsigned int *)((0x0c000002) + (0x1000 *core_num)); *(mpaxh2) = (0x0c00000b + (0x1000 * core_num)); *(mpaxl2) = (0x0c0000bf + (0x1000 * core_num)); *(mpaxh2); *(mpaxl2); *(ptr) = 100; TSCL = 0; Cache_wbInvAll(); st_bef[i] = TSCL; *(ptr); st_aft[i] = TSCL; printf("ch value is 0x%x 0x%x 0x%x\n",st_bef[i],st_aft[i],*ptr); }