Hello everyone,
I'm using a double-buffering scheme for my video signal processing application and I'm having some cache coherency problems (I guess) when using DMA between DDR and IRAM.
Here is what I do, schematically:
1. Call FVID_Exchange for the VPSS's CCDC (get a new frame)
2. Send a chunk of this frame from the DDR to the L2 SRAM and process it using DMA.
3. Call FVID_Exchange for the VPSS's Video0 window (send the frame back to the VPBE)
I'm getting some annoying glitches on the frame when I transfer data from the DDR to the SRAM using DMA. It looks like my L1D/L2 cache are getting corrupted.
Some remarks:
- My video frames are in a cacheable region (using MAR bits)
- When I memcpy the same data from the DDR to the SRAM, no problem at all.
- If I transfer data from the SRAM to the DDR, no problem at all.
- If I enable the cache (using BCACHE_setMode()) during video processing only, it helps but having no cache enabled for other tasks is not acceptable.
Can anyone help me out with this ?
Best Regards,
Romain Farkas