cancel
Showing results for 
Search instead for 
Did you mean: 

What happens when the cortex core tries to access a memory location being written by dma?.

Vde P.1
Associate II

For example, lets say that I have an ADC configured in continuous single channel dma mode, writing to an array of 1 uint32. If the core tries to read that address while the dma is writing to it can it get incorrect values? or does the bus matrix arbitration prevent this?

4 REPLIES 4

One defers to the other, so you either get to read the original value, or the one just written.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Vde P.1
Associate II

okay, thank you

Generally you'd want to architect the code so you don't create self-induced race hazards with DMA buffers. ie you chasing​ a fill, or out running an empty.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Muhammed Güler
Senior III

DMA is active only if the processor is not using the bus. they cannot work at the same time