Page 1 of 1

Help with DMA

PostPosted: Thu, 08.03.2018 22:54:32
by chernandezba
Hi

Are the registers 1A to 1F (DMA related) incremented to the last dma operation? Or do they preserve the initial values?

Thanks

Re: Help with DMA

PostPosted: Fri, 09.03.2018 04:38:59
by TS-Labs
By the end of a transaction all registers related to DMA address store the value of next address calculated accordingly to the addressing mode used in transaction (linear/block addressing, source and destination separately).
This is made for convenience to be able to continue next transaction in sequential addresses.

For instance, you set mode:
Source:
- linear addressing (S_ALGN = 0),
Destination:
- block addressing (D_ALGN = 1),
- 256 bytes align (A_SZ = 0),
- burst length 16 bytes (DMALen = 7),
- number of bursts 4 (DMANum = 3),
- Source address is, hex, page:addr = 05:0000
- Dest address is 3A:1000.
After transaction address will be:
Src: 05:0040 - here is all linear and obvious, i.e. 16*4 bytes read,
Dst: 3A:0400 - here you have four lines written with 16 bytes each, aligned by 0x100, and pointer is finally set to 5th line.

Re: Help with DMA

PostPosted: Fri, 09.03.2018 13:04:31
by chernandezba
Thanks! So I have to store the src and dest at the end of the dma operation on registers 1A to 1F

Re: Help with DMA

PostPosted: Fri, 09.03.2018 16:20:29
by TS-Labs
Yes.

Re: Help with DMA

PostPosted: Fri, 09.03.2018 22:52:50
by chernandezba
Great! I have added it and now more demos/games are working well! :)