Part Number: PROCESSOR-SDK-AM64X
Investigating the UDMA ADC Read example in the SDK, i see the code using cache write back and cache invalidation.
Is it necessary to write back / invalidate the cache also if the code runs only on a R5F core?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: PROCESSOR-SDK-AM64X
Investigating the UDMA ADC Read example in the SDK, i see the code using cache write back and cache invalidation.
Is it necessary to write back / invalidate the cache also if the code runs only on a R5F core?
Hi Robert,
If your data is in on-chip SRAM and the memory region is set to catchable in MPU setting, then you will need to write it back and invalidate, because it may be cached in L1 data cache. If the data is in the TCM, then no need to write it back and invalidate
Best regards,
Ming
Hey Ming,
I do not fully understand the answer, because it seems we have two answers here.
One answer is that it i not possible if the data in SRAM is cached and the other one is that TCM-usage does not need any write back.
So I can also set a region in SRAM to non-cached for the MPU, like we usually do when using shared memory. But this is not located in TCM.
1. Does a non-cached region in SRAM also work like expected?
2. Does TCM in general work without write back and invalidate? I'm asking since you can of course set TCM-regions to cacheable.
regards,
Felix
Hi Felix,
1. For non-cached region in SRAM, no need for "write-back" or "invalidate".
2. for TCM no need for "write-back" or "invalidate", because TCM is not cacheable.
3. for cached region in SRAM, "write-back" or "invalidate" are needed.
Best regards,
Ming