Hi,
I try to use 8byte transmit buffer to transmit data to 160 byte receive buffer
first transmit buffer start first byte to receive buffer ,while transmit buffer byte transmit finsih, dma source address need to repoint to transmit buffer buffer,but I can't make source address repoint to transmit buffer address.
how should i do. Who can tell me the figure that TCD.ATTR.SMOD regist meaning.
Thanks
Source Address Modulo 0 Source address modulo feature is disabled ≠0 This value defines a specific address range specified to be the value after SADDR +SOFF calculation is performed on the original register value. Setting this field provides the ability to implement a circular data queue easily. For data queues requiring power-of-2 size bytes, the queueshould start at a 0-modulo-size address and the SMOD field should be set to the appropriate valuefor the queue, freezing the desired number of upper address bits. The value programmed into thisfield specifies the number of lower address bits allowed to change. For a circular queue application,the SOFF is typically set to the transfer size to implement post-increment addressing with the SMOD function constraining the addresses to a 0-modulo-size range. |
Who can tell me the figure that TCD.ATTR.SMOD regist meaning.
Hi, SMOD/DMOD are there for making of circular buffers. A circular buffer is created as the lower address fields wrap to their original value while the upper fields remain fixed.
If SMOD/DMOD ≠ 0 than it is number of lower source address bits that are allowed to increment.
An example - let's say we want to have cicrucal buffer consisting of 4 bytes. Then SMOD = 2 (i.e. 2 address lines are allowed to increment).
Source address will change following way (considering increment is configured for 1 byte):
0x0
0x1
0x2
0x3
0x0
0x1
0x2
...
Hope it helps