hello, I'm using cache on c6455, I stored image data on DDR2,and the data is transfered by edma3 in ISR, after that I process the image data in a task, here is the pseudo-code
/*image data stored in */
Uint16 img_data[640*512];
/* process result*/
/*data receive interrupt*/
Uint8 process_result[120];
void img_ISR(void) {
BCAHCE_inv(img_data,sizeof(Uint16),0);
edma3_tran(img_data,data_src,sizeof(Uint16));
SEM_post(&sem_process);
}
/*data process task*/
void process_tsk(void){
while(1){
SEM_pend(&sem_process,SYS_FOREVER);
....process image data
....
BCAHCE_wb(process_result,120,0);
edma3_tran(dst_addr,process_result,120);
}
}
but when I check the image_data for example, I copy image data into another array(temp_array[640*512]) using CPU, I found the data is different between temp_array and image_data. I don't why this happen, does I did'nt correctly maintain the cache coherence , can anyone tell me the reson, and give me an advice about using cache.
thank you!