![rtd DM35956HR User Manual Download Page 25](http://html1.mh-extra.com/html/rtd/dm35956hr/dm35956hr_user-manual_1497539025.webp)
RTD Embedded Technologies, Inc.
|
www.rtd.com
25
DM35956HR User’s Manual
6.2.3
SELECT
(R
EAD
/W
RITE
)
This register is used to select between the Index and Data register. All undefined bits may be written with a 0.
B2: DATA
0 = Accessing Index register
1 = Accessing Data register
B1:WR_STRB
Writes take effect on 0 to 1 transition
B0: OE#
0 = Output of EPLD is enabled (for reads)
1 = Output of EPLD is disabled (for writes)
6.2.4
INDEX_DATA
(R
EAD
/W
RITE
)
This register is used to access the Index or Data register.
NOTE: The SELECT and INDEX_DATA register may be accessed using a
single 32-bit operation.
Accessing the Board Registers
6.3.1
R
EADING FROM A
B
OARD
R
EGISTER
To read one of the Board Registers, use the following steps:
1.
Read the GPIOAB_CTRL, GPIOCD_CTRL, SELECT and INDEX_DATA registers and store them so they can be restored.
2.
Save the Index Register
a.
Set GPIOAB_CTRL and GPIOCD_CTRL to their Read values.
b.
Set SELECT such that DATA=0, WR_STRB=0, and OE#=0
c.
Read INDEX_DATA and store it as the Old Index.
3.
Set the Index Register
a.
Set SELECT such that DATA=0, WR_STRB=0, and OE#=1 and set INDEX_DATA to the desired Index.
b.
Set GPIOAB_CTRL and GPIOCD_CTRL to their Write values.
c.
Set SELECT such that DATA=0, WR_STRB=1, and OE#=1. (May also set INDEX_DATA to the desired Index again).
4.
Read the Data Register
a.
Set GPIOAB_CTRL and GPIOCD_CTRL to their Read values.
b.
Set SELECT such that DATA=1, WR_STRB=0, and OE#=0
c.
Read INDEX_DATA as the desired Data.
5.
Restore the Index Register
a.
Set SELECT such that DATA=0, WR_STRB=0, and OE#=1 and set INDEX_DATA to the Old Index.
b.
Set GPIOAB_CTRL and GPIOCD_CTRL to their Write values.
c.
Set SELECT such that DATA=0, WR_STRB=1, and OE#=1. (May also set INDEX_DATA to the Old Index again).