]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blobdiff - pasdk/test_arm/application/main.c
PASDK-432:Add cache writeback on ARM for clearing of DDR3 & MSMC heaps
[processor-sdk/performance-audio-sr.git] / pasdk / test_arm / application / main.c
index ed6c3b93128cf7843b514e49f7fb59456a479886..21c9b36059404f898aff0381241a23560c25ce04 100644 (file)
@@ -49,6 +49,7 @@ All rights reserved.
 #include "pfp_app.h"        /* contains all PFP ID's */
 
 #include <string.h>
+#include <ti/sysbios/hal/Cache.h>
 #include <ti/sysbios/heaps/HeapMem.h>
 // Number of control bytes used in heap buffer after heap initialized by SYSBIOS before main()
 #define HEAP_CONTROL_SZ ( 8 )
@@ -76,10 +77,17 @@ Int main()
     buf = (Ptr)heapmem_stats.buf+HEAP_CONTROL_SZ;
     size = (SizeT)heapmem_stats.size-HEAP_CONTROL_SZ;
     memset(buf, 0, size);
+    Cache_wb(buf, size, Cache_Type_ALLD, 0);
+    Cache_wait();
+        
     HeapMem_getExtendedStats(heapMemDdr3, &heapmem_stats);
     buf = (Ptr)heapmem_stats.buf+HEAP_CONTROL_SZ;
     size = (SizeT)heapmem_stats.size-HEAP_CONTROL_SZ;
     memset(buf, 0, size);
+    Cache_wb(buf, size, Cache_Type_ALLD, 0);
+    Cache_wait();
+    
+    
 
 #if 0 // debug: check ARM SYS/BIOS timestamp provider
     BOARD_initPerfCounters();