DMA - Masked writes?

Status
Not open for further replies.

AnthonyB

New member
Is it possible to cause each write of a DMA operation to be masked to only affect certain bits in the destination instead of entire bytes at a time? I've looked in the processor documentation and couldn't find anything to suggest functionality exists to support this.
 
No. The bitband feature can help, maybe. I think it can be used with DMA too, but I'm not sure and have not tried it.
 
I'm also curious to hear if DMA to the bitband works. I'm going to guess the answer will be no, since the bitband is implemented inside the ARM core.

Likewise, I've occasionally wondered if DMA can access stuff on the ARM private peripheral bus inside the ARM code (all the addresses that begin 0xE...), but never bothered to actually test it.

One other thing to remember is the bitband is a M4-only feature. I already miss is greatly when working with the new M7 chip. :(
 
Last edited:
Thanks for the responses! I'm using a Teensy 3.6, so I'll give it a shot when I have a chance and let you know the results.
 
Unfortunately, it doesn't appear that it's possible to DMA write to the bitband region. Not only did my actual attempts all fail, but I think the documentation tells us that directly:
System 32-bit Address Range: 0x4200_0000–0x43FF_FFFF
Destination Slave: Aliased to AIPS and GPIO bitband
Access: Cortex-M4 core only

The "Access" section shows "All masters" and specifically "DMA" for other memory regions.
 
I clicked Frank's link - one of the links on that page was :: Kinetis MK66, DMA to read GPIO

No simple answer and it quickly runs to uTasker and other dev tools for any attempt at a solution. Not sure if it offers any useful info … or if that question from Luis there somehow is PJRC's Anythony as it seems similar in focus and timing ...
 
DMA to the GPIO pin set, clear & toggle registers definitely does work. Maybe not as convenient as the bitband for certain things. Also only a solution for GPIO output, not a general way to access all peripheral registers like the bitband.
 
Status
Not open for further replies.
Back
Top