ML605/SP605 Hardware Tutorial
11
UG669 (v3.0) March 15, 2011
Executing the System
Set all of the DIP switches labeled GPIO DIP SW (SW1) to the ON position. Then
read from the GPIO register which inputs data from the DIP switches:
XMD%
mrd 0x81440000
The value
0x000000FF
should be returned:
81440000: 000000FF
Change the DIP switch settings and verify that the correct value is read from the
GPIO register.
Note:
Switch 1 is the most significant bit.
•
For SP605:
XMD%
mwr 0x4A000000 0xDEADBEEF
XMD%
mrd 0x4A000000
The value
0xDEADBEEF
should be returned:
4A000000: DEADBEEF
As an example of register access, write to the GPIO register which outputs data to
the 8-bit GPIO LEDs on the SP605 board:
XMD%
mwr 0x81420000 0xA
The value written to this register is now reflected in the GPIO LEDs. The next write
changes the LED display:
XMD%
mwr 0x81420000 0x5
Note:
A read from this register always returns
0x00000000
, as this is an output-only
register.
Set all of the DIP switches labeled GPIO DIP SW (SW1) to the ON position. Then
read from the GPIO register which inputs data from the DIP switches:
XMD%
mrd 0x81440000
The value 0x0000000F should be returned:
81440000: 0000000F
Change the DIP switch settings and verify that the correct value is read from the
GPIO register.
Note:
Switch 1 is the most significant bit.
For more information about XMD and the commands available within XMD, see
UG111,
Embedded System Tools Reference Manual
, Chapter 10.
8.
To download and execute the test software application, enter these commands at the
XMD command prompt:
XMD%
dow board_test_app.elf
XMD%
con