Skip to main content
Associate II
February 12, 2022
Question

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

  • February 12, 2022
  • 3 replies
  • 964 views

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?

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
February 12, 2022

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Vde P.1Author
Associate II
February 12, 2022

okay, thank you

Tesla DeLorean
Guru
February 13, 2022

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Muhammed Güler
Senior III
February 13, 2022

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