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.
Hi,
I'm experiencing, what I think is, cache coherence problem with acquisition data that is transfered from the ADC RAM FIFO results buffer to the L2 RAM using the DMA.
ADC1 Group2 - 8 channels -> DMA channel 3 -> L2 RAM transfer is trig @1KHz
ADC2 Group1 - 5 channels oversampled 8 times -> DMA channel 4 -> L2 RAM transfer is trig @ 3KHz (but can be up to 20KHz)
ADC2 Group2 - 5 channels -> DMA channel 5 -> L2 RAM transfer is trig @1KHz
When the cache is enabled: some data are not transfered at all(their value in L2-RAM is 0 ), some are intermittent, and some are always transferred.
When the cache is disabled : everything is working fine.
Also, the same code has been working fine for many years on the TM570LS3 (which does not have a cache)
How can I investigate this problem ?
Is there some documentation that explain in detail the use of function CoreInvalidateDataCache ?
Is there a way to declare some L2 RAM section not cacheable ?
Best Regards,
Charles Obry
Just to add -- true even though this is in the direction of ADC -> L2SRAM because you rely on the ACP for coherency in this direction
and from the TRM:
The Cortex-R5 ACP memory coherency scheme only provides coherency between an external
master connected to the ACP slave port and a CPU with a data cache in the Cortex-R5 group for
memory regions configured as inner cacheable write-through in the CPU’s MPU. It does not
provide coherency for memory regions configured as cacheable write-back.
Hello Charles,
Charles Obry said:After the MPU setup I dont get these erros anymore.
=>Do you confirm that a conflict between the DMA and the cache would yield these ESM errors ?
Yes. This is the reason the errors went away.
Charles Obry said:The work around is :
Enable CPU MPU to block any access (real and speculative) outside the valid memory range.
=>How can I assure no untaken speculative data fetch will arise?
=>Should I disable this error ?
By using the MPU to block the speculative fetches to memory that isn't valid, you would prevent the errors from occurring. There is still the normal occurrence of untaken speculative fetches but since they are not to invalid memory, the errors will not occur.
Hi Chuck,
When you say:
By using the MPU to block the speculative fetches to memory that isn't valid, you would prevent the errors from occurring. There is still the normal occurrence of untaken speculative fetches but since they are not to invalid memory, the errors will not occur.
Is there a default MPU config for the TMS570LC4, that prevent access to invalid memory ? What do you mean exactly by invalid memory ?
Also, concerning the safety mechanism of the TMS570LC4, do you have statistics about the functionnalities of the IC that are more prone to errors and their rates ?
Is using the cache compare to not using it (as with the LS3) makes a difference ?
Regards
Charles