2019-01-22 09:09 AM
Hello,
I have recently moved RAM from DTCM to AXI SRAM (so that I get more RAM).
It then failed in dma example.
After investigation I found out that the call to SCB_InvalidateDCache results in HardFault_Handler.
I've changed it to use
SCB_InvalidateDCache_by_Addr((uint32_t *)aDST_Buffer, (BUFFER_SIZE));
and now it function OK, but I don't yet understand why SCB_InvalidateDCache fails with AXI SRAM.
I am using st32h743-eval
Thank you,
ranran
Solved! Go to Solution.
2019-01-22 10:34 AM
>> I don't yet understand why SCB_InvalidateDCache fails with AXI SRAM.
Doing a blanket level invalidate, doesn't flush, you likely just end up losing the stack and any pending writes against memory.
CleanDCache is the flushing method.
Use the Invalidate method of regions which DMA (to memory) has changed the underlying memory.
2019-01-22 10:34 AM
>> I don't yet understand why SCB_InvalidateDCache fails with AXI SRAM.
Doing a blanket level invalidate, doesn't flush, you likely just end up losing the stack and any pending writes against memory.
CleanDCache is the flushing method.
Use the Invalidate method of regions which DMA (to memory) has changed the underlying memory.
2019-01-22 11:59 AM
Right, I did invalidate regions using SCB_InvalidateDCache_by_Addr (as I wrote in the original post above)
Yet, why does AXI-SRAM behaves different from DTCM in term of cache ?
2019-01-22 12:20 PM
The DTCM memory isn't connected to the cache