Advice Needed Regarding K60, LCD and DMA Transfer.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Advice Needed Regarding K60, LCD and DMA Transfer.

ソリューションへジャンプ
2,852件の閲覧回数
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

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 解決策
2,388件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
2,388件の閲覧回数
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.

2,389件の閲覧回数
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 件の賞賛
返信
2,388件の閲覧回数
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 件の賞賛
返信