0

I've been working on my bare metal DMA code. I've heard that you need to pass bus addresses to initialize DMA control block. I want to know why you need to put 0xC or 0x4 in front of memory address for DMA to use it, why can't DMA use normal physical addresses?

2
  • 1
    I've edited this question rather than closing it as a duplicate of your last one or as "too broad" (see "What types of questions should I avoid asking?", particularly paragraph 2 and 3). I also recommend you take the tour; this site is a tool and like any other you will get the most out of it if you read the documentation.
    – goldilocks
    Aug 23, 2016 at 0:32
  • 1
    Note we are not a discussion forum, and people who are used to that are often confused by the Q&A format, which places more of an explicit set of responsibilities on the person asking the question. A theme common to both those questions is making very little effort to fish for potentially large volumes of information -- that's what search engines are for, and we aren't one of those either. To draw an analogy, don't deposit $5 in the bank expecting to come back in a few days and find $10,000. If that's what you need to do, a casino is a more appropriate venue.
    – goldilocks
    Aug 23, 2016 at 0:32

1 Answer 1

2

You can't use normal addresses because the DMA hardware is directly connected to the memory bus and uses (physical) bus addresses.

Beware that the DMA controller is directly connected to the peripherals.
Thus the DMA controller must be set-up to use the Physical (hardware)
addresses of the peripherals.

Page 38 BCM2835 ARM Peripherals

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.