Advice Needed Regarding K60, LCD and DMA Transfer.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Advice Needed Regarding K60, LCD and DMA Transfer.

Jump to solution
992 Views
weblar
Contributor V

Hi,

I'm hoping for some advice and a general point in the right direction.

I have a 3.5" TFT display driven in 8080 mode (16-bit parallel bus) which at present works well although the display flickers somewhat when performing large updates to the screen.

I've been reading that using DMA would speed things up however I've never used DMA before and I'd appreciate some advice on how this would benefit me and also how I would go about implementing this for my 16-bit parallel bus.

Any information would be greatly received.

Kind regards,

Kevin

Labels (1)
Tags (3)
0 Kudos
1 Solution
529 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

After Flexbus module initialization and DMA configuratio correctly, DMA can start transfer data from memory to LCD controller without core intervene. That will enhance the MCU performance.

About how to use eDMA module, Please refer attached example code.

Wish it helps.

View solution in original post

0 Kudos
3 Replies
529 Views
egoodii
Senior Contributor III

Note that the DMA engine is NOT inherently 'faster' than the MCU core.  That is, the microcode that runs the control and pointer operations for DMA don't really run any faster than the same kinds of instructions in an optimized MCU loop.  The particular advantage of DMA is if the CPU can get 'other work' done during the transfer.

530 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

After Flexbus module initialization and DMA configuratio correctly, DMA can start transfer data from memory to LCD controller without core intervene. That will enhance the MCU performance.

About how to use eDMA module, Please refer attached example code.

Wish it helps.

0 Kudos
529 Views
sholmgren
Contributor I

Hi,

I have used the example code you supplied and it works fine. Then I have tried to adapt it to send more data but it does not behave as expected. I have allocated to arrays:

char source[128];

char destination[128];

Then I set the source destination registers like this:

DMA_TCD0_SADDR = (uint_32)source;

DMA_TCD0_DADDR = (uint_32)destination;

When I try to copy the data, more data is copied than what I want. For instance, if I set registers like this:

DMA_TCD0_SOFF = 0x04;

DMA_TCD0_ATTR = DMA_ATTR_SSIZE(2) | DMA_ATTR_DSIZE(2);

DMA_TCD0_NBYTES_MLNO = 0x04;

DMA_TCD0_DOFF = 0x04;

DMA_TCD0_CITER_ELINKNO = DMA_CITER_ELINKNO_CITER(1);

DMA_TCD0_BITER_ELINKNO = DMA_BITER_ELINKNO_BITER(1);

I would expect that 4 bytes would be copied, but instead 20 bytes are copied.

If I then change the minor byte count register like this:

DMA_TCD0_NBYTES_MLNO = 0x08;

I would expect that 8 bytes would be copied, not 64 bytes, that actually is copied.

I must have misunderstod something, can someone explain the behaviour I see?

Regards,

Sebastian

0 Kudos