PRDT address problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Raymond
Member
Member
Posts: 68
Joined: Thu Jun 09, 2016 4:39 am
Libera.chat IRC: 573410792

PRDT address problem

Post by Raymond »

hi,i have a problem about bus master dma.

If I hava two sperated PRDT,

Code: Select all

// first entry
0x12340000 // physical starting address
0x00001000 // 4096 bytes
0x12341000 // next physical address
0x80001000 // 4096 bytes with the EOT bit set 
how can the machine know the next physical address for the dma address register?Or i need to set it into the address register again?
User avatar
BenLunt
Member
Member
Posts: 941
Joined: Sat Nov 22, 2014 6:33 pm
Location: USA
Contact:

Re: PRDT address problem

Post by BenLunt »

The table has a count of 8-byte entries, consecutively following one another until the EOT is found.

i.e.: the controller will use the first 8-byte entry, then the next 8-byte entry, and so on until an error is found or the EOT bit is set.

These 8-byte entries must be physically consecutive in memory, all on a 4-byte boundary.

Once the controller finds and error or the EOT bit set, it will stop. You should again write to the address register the next time you wish to make a transfer.

If I remember correctly, and I would have to check my notes to make sure, the address register will point to the last executed PRD Table entry, successfully executed or not, so that you might be able to find out where the error occurred, if one did.

Ben
Post Reply