Other Parts Discussed in Thread: OMAPL138
Hi, recently I am programming on 6670 plaform, In my application, L1d cache size is 32KB and L2 cache 0KB, some data produced by a coprocessor and stored on the MCSM should be read and processed by the CPU core, so I write the following code:
Line0: ------blank
Line1: CACHE_invL1d(MCSM_Data_Addr, MCSM_Data_Len, CACHE_WAIT**);
Line2: processing the data located in the MCSM_Data_Addr.
But occasionally, the read data of Line2 is not equal to that located in MCSM_Data_Addr.
In order to solve the problem, I modify the code, i.e. adding invalidatePrefetchBuffer operation before CACHE_invL1d,
Line0: CSL_XMC_invalidatePrefetchBuffer();
Line1: CACHE_invL1d(MCSM_Data_Addr, MCSM_Data_Len, CACHE_WAIT**);
Line2: processing the data located in the MCSM_Data_Addr.
But I do not known why CSL_XMC_invalidatePrefetchBuffer() statement should be used. Should CSL_XMC_invalidatePrefetchBuffer() be used before every CACHE_invL1d() statement ? If yes or not, why ?
Thanks for your kind help! Best wishes!