
EVMPost V1.0.0.0 (Power On Self Test)
-------------------------------------




1-Introduction
  ------------

This program allows to do a small evm power on self diagnostic. This program could be run from CCS, but would be usually
burned in evm flash memory and will run at evm startup (see section 2 below).

EVMPOST has two user's interface to report test results: CCS console output (stdout) or evm 4 user LEDS (DS3-DS6). When run
from CCS, both user interfaces are available at same time. When run from flash memory, only LED interface is available.
When burned in flash memory, evmpost can be used to debug hardware problems without using CCS and a jtag emulator.

Before doing any tests, a user LEDS checking is done ("EVM Post user LEDS Check"). This will light all user LEDS, one
at a time in a sequence, so user can verify that each led is working correctly, so they can be used safely as a user
interface for the tests sequence later. At the end of this led checking, all user leds will be OFF and tests will begin.


I) LEDS usage.

a) While testing, each test has a binary test number value that is output in binary on the evm user's leds while this test
is in progress (DS3 led is least significant bit, DS6 led is most significant bit). A led that is lit means that this
bit position is = 1.

Ex.: Test #6 -> binary 0110 -> LEDS DS3:OFF, DS4:ON, DS5:ON, DS6:OFF

b) When all the tests complete successfully, all user LEDS will be ON and remain this way forever.

c) When a test fails, the test sequence will stop and the failed test binary number will flash on the user LEDS forever.


II) CCS Console usage (CCS stdout)

a) All tests begin with a string similar as this one:
"DSP DDR mem test V1.0.0.0 ..."

When the test is completed, there will be a similar ending message as the beginning message as this one if success:
"DSP DDR mem test V1.0.0.0 ... SUCCESS!"

and

"DSP DDR mem test V1.0.0.0 ... FAIL!"
or
"DSP DDR mem test V1.0.0.0 ... ERROR!"

in case of problems.

b) The complete tests result status can be verified by looking of last displayed line:
"EVM Post V1.0.0.0... SUCCESS!"
means all the tests completed successfully.
"EVM Post V1.0.0.0...  ERROR code 0x1!"
means the tests failed and last test reported error code is 0x1.


III) List of Tests

a) Test #1(0001): DDR memory quick test ("DSP DDR mem test V1.0.0.0") (LEDS: DS3:ON, DS4:OFF, DS5:OFF, DS6:OFF)

This test is a multiple steps test that will perform a quick DDR ram memory test on some memory addresses. It will do:

-Data 1 bit walking (a '1' bit goes from D0 to D31 while other bits are 0).
-Data 0 bit walking (a '0' bit goes from D0 to D31 while other bits are 1).
-Address 1 bit walking (a pattern is written in memory at different addresses, each address used has a walking '1' bit).
-Address 0 bit walking (a pattern is written in memory at different addresses, each address used has a walking '0' bit).
-0x55555555 pattern at address bit walking (similar as address bitwalking, but using a fix pattern instead).
-0xAAAAAAAA pattern at address bit walking (similar as address bitwalking, but using a fix pattern instead).
-0x00000000 pattern at address bit walking (similar as address bitwalking, but using a fix pattern instead).
-0xFFFFFFFF pattern at address bit walking (similar as address bitwalking, but using a fix pattern instead).
-0x55 pattern test byte lane (this test is to verify that each byte lane of a 32 bits word of DDR is working correctly).


b) Test #2(0010): I2C test ("I2C test") (LEDS: DS3:OFF, DS4:ON, DS5:OFF, DS6:OFF)

This test will verify that each of the I2C peripherals on the I2C primary bus are detected and can be read correctly.


c) Test #3(0011): Ethernet MDIO and PHY test ("Ethernet MDIO and PHY test") (LEDS: DS3:ON, DS4:ON, DS5:OFF, DS6:OFF)

This test will verify the DSP and ethernet PHY MDIO interface by trying to detect each ethernet PHY presence.

 
D) Test #4(0100): Audio tone test ("Audio tone out test on all channels") (LEDS: DS3:OFF, DS4:OFF, DS5:ON, DS6:OFF)

This test outputs a 1KHz audio tone on all 4 audio codecs channels (Left & Right). The user can connect each of these
channels through connector J2 or channels of 1st codec with P2 to an external audio line-in equipment to verify a
correct audio tone (or use an oscilloscope). Test last ~5 secs.


E) Test #5(0101): SD video NTSC test ("SD video color bar test HD and J13 video out") (LEDS: DS3:ON, DS4:OFF, DS5:ON, DS6:OFF)

This test will output a standard video NTSC (480i) color bar pattern in composite video on J13 video output (using the
SVIDEO to RCA composite video cable adapter). It will also output the same video signal on the component video outputs
(using the VGA to component video cable adapter connected to J14). Test last ~5 secs.


F) Test #6(0110): Uart RS232C test ("Uart RS232C communication loopback test") (LEDS: DS3:OFF, DS4:ON, DS5:ON, DS6:OFF)

This test will verify the receive/transmit data path of DSP/evm uart rs232c through the evm rs232c level driver. Data is
sent on the transmit output and must be loopback externally (UART_TX pin3 connected to UART_RX pin2 on DB9 P7 connector) by
a user provided cable/adapter (a RS232C serial loopback test plug can also be used with evm production boards. This kind
of loopback plug is not provided with the evm. It is not possible to use a loopback plug for beta boards, so only possible
solution is to use loopback software with null-modem cable as explained below).

A RS232C "null-modem" type cable connected to a PC RS232C serial port can also be used if the PC is running a software
that loopback each character received ("LYRTECH Serial Comm Loopback Tool" as an example, see section 3 below). If no loopback
software is available, any PC serial terminal software may be used to check if character is transmitted by the EVM ('0').
But this will allow to verify only one direction and the test will fail if using a terminal software that doesn't loopback
the characters.


Typical program output (when ran from CCS):
=======================================================================================
EVM Post V1.0.0.0...

EVM Post user LEDS Check...
EVM Post user LEDS Check... SUCCESS!

DSP DDR mem test V1.0.0.0 ...
Flush all caches and disable...
Flush all caches and disable... Done.

DSP DDR quick mem test...
Data 1 bit walking test in DDR...
Data bit walk successfull.
Data 1 bit walking test in DDR... Done.
Data 0 bit walking test in DDR...
Data bit walk successfull.
Data 0 bit walking test in DDR... Done.
Address 1 bit walking test in DDR...
Address bit walk successfull.
Address 1 bit walking test in DDR... Done.
Address 0 bit walking test in DDR...
Address bit walk successfull.
Address 0 bit walking test in DDR... Done.
0x55555555 pattern at address bit walking test in DDR...
Pattern at memory location with address bit walk, successfull.
0x55555555 pattern at address bit walking test in DDR... Done.
0xAAAAAAAA pattern at address bit walking test in DDR...
Pattern at memory location with address bit walk, successfull.
0xAAAAAAAA pattern at address bit walking test in DDR... Done.
0x00000000 pattern at address bit walking test in DDR...
Pattern at memory location with address bit walk, successfull.
0x00000000 pattern at address bit walking test in DDR... Done.
0xFFFFFFFF pattern at address bit walking test in DDR...
Pattern at memory location with address bit walk, successfull.
0xFFFFFFFF pattern at address bit walking test in DDR... Done.
0x55 pattern test byte lane in DDR...
Pattern Byte Lane successfull.
0x55 pattern test byte lane in DDR... Done.
DSP DDR quick mem test...Done.

DSP DDR mem test V1.0.0.0 ... SUCCESS!

I2C test...
Find device 0x18
Find device 0x19
Find device 0x1a
Find device 0x1b
Find device 0x20
Find device 0x44
Find device 0x5c
Find device 0x5e
Find device 0x5f
Find device 0x70
Find device 0x2c

I2C test... SUCCESS!

Ethernet MDIO and PHY test...
Waiting for PHY to get alive...
Detected PHY bits: 3
Marvell OUI detected for PHY device 0.
Marvell OUI detected for PHY device 1.

Ethernet MDIO and PHY test... SUCCESS!

Audio tone out test on all channels 1-8...

Audio tone out test on all channels 1-8... SUCCESS!

SD video color bar test HD and J13 video out...

SD video color bar test HD and J13 video out... SUCCESS!

Uart RS232C communication loopback test...

Uart RS232C communication loopback test... SUCCESS!

EVM Post V1.0.0.0... SUCCESS!
=======================================================================================




2-Burning evmpost in evm flash memory
  -----------------------------------

EVMPOST "evmpost.out" program can be easily programmed in flash memory by using the tool "evmupdater".

See instructions located in "evmupdater\doc\evmupdater.txt" on how to burn a program (in .out application mode I)
in evm flash memory.

IMPORTANT: To allow evmpost to run at evm power on, "Master Mode - EMIF ROM Direct Boot" must be used and evm
SW2 and SW3 dips switches banks must be set correctly (see evmupdater.txt for details).




3-Installation of LYRTECH Serial Comm Loopback Tool
  -------------------------------------------------

This optional tool can be used for testing RS232C serial loopback with evmpost as explained above. It is provided as a
convenience only (unsupported tool), for evm beta users so Uart test can be done correctly. This tool is intended to run
on a fast computer running windows XP. Run "CommLoopBack\setup.exe" to install the tool. It will loopback any character
received (transmit what is received on the same RS232C port).

For production boards, a serial loopback plug can be used instead of this tool which is not necessary (contact a good
electronic retailer).

To run the tool, you need a computer with a serial RS232C port (DB9 male connector). This tool has not been tested
with an "usb to serial adapter", but it should work if the computer is fast enough. Please do not run any other cpu
intensive task on the computer at same time as this tool, while doing evmpost uart testing (so the loopback of serial
characters is fast enough before evmpost uart test timeout).

To run "LYRTECH Serial Comm Loopback Tool", run "Lyrtech CommLoopBack" located in program menu "Lyrtech CommLoopBack".
Leave the default serial port settings "115200,n,8,1" as is. In the "Comm Port Used" box, select the COMx port number to use,
where is conneccted the RS232C NULL-MODEM cable to evm RS232C port (usually, it would be COM1, if there is only one
physical COM port on the computer, but it could be anything else like COM3 or COM4 if an "usb to serial adapter" is used).
While testing the evmpost uart test, you will see each character that is loopback in "Serial Communication Status" window
of ("LYRTECH Serial Comm Loopback Tool").
