2022-03-31 06:58 AM
Hi all,
I'm using the MDMA to communicate with an external flash over QUADSPI.
I have an implementation which works great without FreeRTOS, but when I implement it using FreeRTOS I get Transfer Error Address. I have verified that the RAM address exists in AXI memory so it seems like there is something about FreeRTOS that is not allowing the MDMA to read the memory?
// Write operation
MDMA_Channel0->CDAR = &QUADSPI->DR;
MDMA_Channel0->CSAR = pData;
// Read operation
MDMA_Channel0->CDAR = pData;
MDMA_Channel0->CSAR = &QUADSPI->DR;
I've seen the issue with both read and write operations. For both read and write the MDMA_CESR_TED = 0, meaning that the error is related to a read access.
This is the flow of the program:
These are the MDMA registers when I enable the MDMA at step 5:
These are the MDMA registers when I get the error interrupt at step 6:
These are the QUADSPI registers when I enable the MDMA at step 5:
These are the QUADSPI registers when I get the error interrupt at step 6:
I have tried adding various delays in case it is a timing issue but to no avail. I don't understand why I get the error.
Edit: Changed places of screenshots to easier compare them
Solved! Go to Solution.
2022-04-01 06:54 AM
The issue that caused the error was
MDMA_CxTBR_SBUS
Changing that from 1 to 0, and it no longer crashed. The other issue I faced which is why I though this was RTOS related was that the FreeRTOS variables shared the same memory in RAM as my local variables.
2022-04-01 06:54 AM
The issue that caused the error was
MDMA_CxTBR_SBUS
Changing that from 1 to 0, and it no longer crashed. The other issue I faced which is why I though this was RTOS related was that the FreeRTOS variables shared the same memory in RAM as my local variables.