Part Number: AM3359
Tool/software: TI-RTOS
Hello !
My configuration is the following one:
- Sitara ARM3359
- Code Composer Studio version CCS 6.1.2.00015
- SYS/BIOS 6.45.01.29 Real Time Operating System
- XDC Tool 3.32.00.06
- Compiler GNU v4.8.4 (Linaro)
- NDK 2.24.3.35
- Sysbios sdk 2.1.3.2
- software Texas Instrument ecat_appl with beckoff patch v5.11
In order to improve our code we need to make operations very fast.
So, we are investigating on using cache to improve the speed execution.
The MMU table is the following one:
SYS_MMU_ENTRY applMmuEntries[] =
{
{(void *)0x08000000, SYS_MMU_CACHEABLE | SYS_MMU_BUFFERABLE}, //NOR - bufferable| Cacheable
{(void *)0x08100000, SYS_MMU_CACHEABLE | SYS_MMU_BUFFERABLE}, //NOR -bufferable| Cacheable
{(void *)0x08200000, SYS_MMU_CACHEABLE | SYS_MMU_BUFFERABLE}, //NOR - bufferable| Cacheable
{(void *)0x48300000, 0}, //PWM - Non bufferable| Non Cacheable
{(void *)0x48200000, 0}, //INTCPS,MPUSS - Non Bufferable| Non Cacheable
{(void *)0x48100000, 0}, //I2C2,McSPI1,UART3,UART4,UART5, GPIO2,GPIO3,MMC1 - Non bufferable| Non Cacheable
{(void *)0x48000000, 0}, //UART1,UART2,I2C1,McSPI0,McASP0 CFG,McASP1 CFG,DMTIMER,GPIO1 -Non bufferable| Non Cacheable
{(void *)0x44E00000, 0}, //Clock Module, PRM, GPIO0, UART0, I2C0, - Non bufferable| Non Cacheable
{(void *)0x4A300000, SYS_MMU_SHAREABLE | SYS_MMU_BUFFERABLE}, //PRUSS1 -Bufferable| Non Cacheable | Shareable
{(void *)0x49000000, 0}, //EDMA3 - Non bufferable| Non Cacheable
{(void *)0x4A000000, 0}, //L4 FAST CFG- Non bufferable| Non Cacheable
{(void *)0x4A100000, 0}, //CPSW - Non bufferable| Non Cacheable
{(void *)0xFFFFFFFF, 0xFFFFFFFF}
};
and in the tiescutils.c file whe hae the following initialisation:
SDKMMUInit(applMmuEntries); // needed first
Cache_lock((Ptr)0x80000000, 0x8000);
Cache_wait();
Cache_lock((Ptr)0x80008000, 0x8000);
Cache_wait();
Cache_lock((Ptr)0x80010000, 0x8000);
Cache_wait();
Cache_lock((Ptr)0x80018000, 0x8000);
Cache_wait();
Cache_lock((Ptr)0x80020000, 0x8000);
Cache_wait();
Cache_lock((Ptr)0x80028000, 0x8000);
Cache_wait();
Cache_lock((Ptr)0x80030000, 0x8000);
Cache_wait();
pruIcss1Handle = (PRUICSS_Handle)malloc(sizeof(PRUICSS_Config));
pruIcss1Handle->object = (PRUICSS_V1_Object *)malloc(sizeof(
PRUICSS_V1_Object));
pruIcss1Handle->hwAttrs = (PRUICSS_HwAttrs *)malloc(sizeof(
PRUICSS_HwAttrs));
.......................................
BIOS_start();
before starting the BIOS, we tried to enable cache with the following code:
Cache_enable(Cache_Type_L2 );
Cache_enable(Cache_Type_L1P );
Cache_enable(Cache_Type_L1D );
We have make measures with a scope connected on a sitara output to see if the speed is improved but nothing seems to change !
We don't know if the cache is really enable and, if not, how to do it !
Can someone help us, please ?
Thanks a lot !
Laurence