NO:
W90P710 Programming Guide
VERSION:
2.1
PAGE:
64
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed,
distributed or reproduced without permission from Winbond.
Table No.: 1200-0003-07-A
SOFTREQ won’t be self-cleared. In this case, the SOFTREQ bit should be cleared before next
software GDMA request.
It should be note that the source and destination base address must be in the right alignment
according to its transfer width. For example, if the transfer width is 32-bit, the source and destination
base address should be word-alignment. If each one is not aligned, the GDMA will read from and
write to wrong addresses and the alignment error flags, SABNDERR and DABNDERR, will be set.
Figure 5-4 shows an example code for software GDMA transfer.
Figure 5-4 Software GDMA Transfer
# d e f i n e B A S E 0 x c 0 0 0 0 0 0 0
# d e f i n e G D M A _ S R C B 0
( B A S E + 0 x F F 0 4 0 0 4 )
# d e f i n e G D M A _ D S T B 0
( B A S E + 0 x F F 0 4 0 0 8 )
# d e f i n e G D M A _ T C N T 0
( B A S E + 0 x F F 0 4 0 0 C )
# d e f i n e G D M A _ C S R C 0
( B A S E + 0 x F F 0 4 0 1 0 )
# d e f i n e G D M A _ C D S T 0
( B A S E + 0 x F F 0 4 0 1 4 )
# d e f i n e G D M A _ C T C N T 0
( B A S E + 0 x F F 0 4 0 1 8 )
v o i d m a i n ( v o i d )
{
* ( ( v o l a t i l e U I N T * ) G D M A _ C T L 0 ) = 0 x 0 ;
* ( ( v o l a t i l e U I N T * ) G D M A _ S R C B 0 ) = 0 x c 2 0 0 0 0 0 0 ;
* ( ( v o l a t i l e U I N T * ) G D M A _ D S T B 0 ) = 0 x c 2 0 0 1 0 0 0 ;
* ( ( v o l a t i l e U I N T * ) G D M A _ T C N T 0 ) = 0 x 1 0 ;
* ( ( v o l a t i l e U I N T * ) G D M A _ C T L 0 ) = 0 x 1 2 8 0 1 ;
w h i l e ( ! ( * ( ( v o l a t i l e U I N T * ) G D M A _ C T L 0 ) & 0 x 4 0 0 0 0 ) )
;
}