Content originally posted in LPCWare by arw on Mon Feb 15 08:14:06 MST 2016
Hello MX21,
There is not an immediate answer to say what size of DMA transfer is correct. It depends on your system: display resolution, color depth, frame rate, how often you transfer from SRAM to SDRAM, etc.
There is only one port on the internal bus, for the SDRAM controller. If multiple DMAs are active, then they will have to arbitrate which one is able to perform a transfer.
The reason that memcpy works, is because this is operated by the CPU. After the CPU writes one byte/word value from SRAM to SDRAM, the LCD DMA has time to master the bus for larger transfers from SDRAM to the display.
I would recommend to start the SRAM to SDRAM transfers as small as possible, say 256 bytes in multiple DMA cycles, and then work up to see the right balance for your system.
-arw