Board Diagnostic Overview
=========================

Overview
--------

The PDK Diagnostic package is designed to be a set of
baremetal tests to run on a given board to provide data path continuity
testing on peripherals.

Primary goal of the diagnostic tests is to validate the interfaces on the HW boards
to confirm there are no connectivity and assembly issues. Implementation of
diagnostic tests will not cover the complete protocol or specification used by
the interface under test. Board diagnostic tests serve as reference for board
bring-up but they are not recommended to be used as reference for production
software development.

Building the Diagnostic Tests
------------------------------

Pre-requisites for Diagnostics Build
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#. Follow the steps provided in PDK userguide to setup the build environment.
#. You will need the following libraries built:

-  Board
-  UART
-  GPIO
-  I2C
-  SPI
-  CSL
-  ICSS
-  PRUSS
-  MMCSD
-  ENET
-  USB
-  CPSW
-  OSAL
-  FatFS

.. ifconfig:: CONFIG_family in ('am65xx', 'jacinto', 'j7200', 'am64x')

  -  UDMA
  -  SCICLIENT
  
.. ifconfig:: CONFIG_family in ('jacinto', 'j7200')

  -  PMIC

.. ifconfig:: CONFIG_family in ('jacinto')

  -  DSS
  -  CSIRX


(Note: not every library is used for every application, and these
libraries should come pre-built with any fresh installation of the SDK)

Build Commands
^^^^^^^^^^^^^^^
 - Build the diagnostic tests using the below command
 
:: 
  
   make BOARD=<Board Name> CORE=<Core Name> <Diag Build Name>
   <Board Name> is the board for which diagnostics need to be built (Ex: |__PART_DEFAULT_BOARD__| )
   <Core Name> is the CORE ID (Ex: mcu1_0)
   <Diag Build Name> is the diagnostic build target name as defined in <PDK>/packages/ti/board/diag/board_diag_component.mk

|

 - Successful build creates the diagnostic application at **<PDK>/packages/ti/binary/board_diag_<Test Name>/bin/<Board Name>**

Running the Diagnostic Examples
-------------------------------

Loading through SD Card
^^^^^^^^^^^^^^^^^^^^^^^^

.. ifconfig:: CONFIG_family in ('jacinto', 'j7200', 'am65xx')

    Diagnostic tests can be run through SD card either using standalone test binary
    or through menu based diagnostic framework application. Below sections describe the procedure
    for each method.

|

SD card must be set up to a bootable format for running the diagnostic tests from SD card.
Refer to the `PDK Boot <../boot/boot.html#sbl-overview>`__ page for information on how the SD card is handled.

Running Standalone Diagnostic Tests through SD Card
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Build diagnostic test application by following the steps described in section `Building the Diagnostic Tests`_
 - Copy the diagnostic application image (.appimage) to SD card and rename it to 'app'
 - Copy the system firmware and bootloader images to SD card
 - Insert the SD card into the board
 - Connect the serial port of the board to host PC
 - Open Terminal emulator program eg: Teraterm to connect to the board's
   UART console

.. ifconfig:: CONFIG_family in ('jacinto', 'j7200')

 .. note::
     Use MAIN UART0 console for running the tests on mpu1_0, mcu2_0 cores and MCU UART console
     for running the tests on mcu1_0 core.

|

.. ifconfig:: CONFIG_family in ('am64x')

 .. note::
     Use MAIN UART0 console for running the tests on mcu1_0 core and MAIN UART1 console
     for running the tests on mpu1_0 core.

|

.. ifconfig:: CONFIG_family in ('am65xx')

 .. note::
     Use MAIN UART0 console for running the tests on mpu1_0 and MCU UART console
     for running the tests on mcu1_0 core.

|

 - Power ON the the board.
 - Diagnostic test should start running and display the log on the console.

.. ifconfig:: CONFIG_family in ('jacinto', 'j7200', 'am65xx')

    Running Diagnostic Framework Application through SD Card
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

     - Build all the diagnostic test applications by following the steps described in section `Building the Diagnostic Tests`_
     - Copy the ‘.appimage’ files  from '<PDK>/packages/ti/binary/board_diag<Test Name>/bin/<Board Name>' folder to SD card
     - Rename the file board_diag_framework_xxx.appimage to ‘app’
     - Rename board_diag_<Test Name>_xxx.appimage files to <Test Name>_TEST
     - Copy the system firmware and bootloader images to SD card
     - Connect the serial port of the board to host PC
     - Open Terminal emulator program eg: Teraterm to connect to the board's
       UART console

     .. note::
         Use MAIN UART0 console for running the tests on mpu1_0, mcu2_0 cores and MCU UART console
         for running the tests on mcu1_0 core.

     - Power ON the the board.

    You should see the following screen when board is bootted with diagnostic binaries in SD card:

    .. Image:: ../../images/board/diag_screen1.jpg

    The framework diagnostic application should be loaded through SBL, and
    gives you the options:

    -  help - prints the command menu and descriptions of the commands
    -  run - run a diagnostic application found on the SD card
    -  status - current status of the framework run

    Below is an example of running a diagnostic application:

    .. Image:: ../../images/board/diag_screen2.jpg

    Result of return from above run:

    .. Image:: ../../images/board/diag_screen3.png

|

Loading through UART
^^^^^^^^^^^^^^^^^^^^^^
 - Build diagnostic test application by following the steps described in section `Building the Diagnostic Tests`_
 - Configure the board for UART boot
 - Connect the serial port of the board to host PC 
 - Open Terminal emulator program eg: Teraterm to connect to the board's
   UART console

.. ifconfig:: CONFIG_family in ('jacinto', 'j7200')

 .. note::
     Use MAIN UART0 console for running the tests on mpu1_0, mcu2_0 cores and MCU UART console
     for running the tests on mcu1_0 core.

|

.. ifconfig:: CONFIG_family in ('am64x')

 .. note::
     Use MAIN UART0 console for running the tests on mcu1_0 core and MAIN UART1 console
     for running the tests on mpu1_0 core.

|

.. ifconfig:: CONFIG_family in ('am65xx')

 .. note::
     Use MAIN UART0 console for running the tests on mpu1_0 and MCU UART console
     for running the tests on mcu1_0 core.

|


 - Power ON the the board, the console should show a sequence of CCC being printed
 - Choose the X-Modem interface and send the SBL that was built for UART. 
   After the transfer is completed, repeat the same step for sysfw.bin (or, for HS device, use the ‘sysfw-hs-enc.bin’)
   and the diagnostic application image (.appimage). You will see notifications to perform these actions.
 - Check the console logs after diagnostic test is loaded through UART.

Running or debugging on CCS
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To debug your application, CCS can give you access to the chip's memory
and register values. You can follow the below steps to load and run an
application in CCS. If you have a SD card loadable image, and is able to
load your application, you can connect to the corresponding core in CCS and load
symbols without having to load and run the entire application. After
building the diagnostic application, the output files should be
generated under '<PDK>/packages/ti/binary/board_diag<Test Name>/bin/<Board Name>'.

For running the diagnostic tests from CCS, pinmux configurations in diagnostic tests
need to be enabled by defining the macro 'PDK_RAW_BOOT'. This is done by default for 
debug build profile. For enabling the pinmux for release build profile, define the 
macro 'PDK_RAW_BOOT' in <PDK>/packages/ti/board/diag/board_diag_component.mk by
adding the line 'export BOARD_DIAG_CFLAGS = -DPDK_RAW_BOOT'.
This is required because the default diagnostic loading method
is through SD card, and the pinmux is done by sbl. Adding this option
only forces the diagnostic applications to do pinmuxing within the
application itself (and not depend it being done).

To run on CCS:

 - Connect USB cable to the board's JTAG
 - Connect the UART serial cable.
 - Plug in power cord to your board
 - Press the power button on the board to turn the board on
 - Setup and run CCSv10 (or higher).
 - Launch target configuration for the board
 - Connect to the core that you built your application for.
 - Load the program by pressing the load button and navigate the
   explorer to the .out file that you want to load
 - Press the Run button to run the program
 - Check UART console to see if anything is printed out. \**If nothing
   is printed out, pause the core and see where the program counter is
   at. If it is at 0x3808c (or near it), try reloading the program and
   running again.


Diagnostic Applications Support
-------------------------------

+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                      Name                       |    Description    | AM65xx | AM65xx | J721E  | J7200  | AM64x  |
|                                                 |                   | EVM    | IDK    | EVM    | EVM    | EVM    |
|                                                 |                   |        |        |        |        |        |
+=================================================+===================+========+========+========+========+========+
|                                                 | Reads the input   |        |        |        |        |        |
|    adc_TEST                                     | voltage provided  |        |        |   x    |   x    |   x    |
|                                                 | on ADC header.    |        |        |        |        |        |
|                                                 | Verifies          |        |        |        |        |        |
|                                                 | Multiple ADC      |        |        |        |        |        |
|                                                 | channels.         |        |        |        |        |        |
|                                                 | Need to provide   |        |        |        |        |        |
|                                                 | voltage input on  |        |        |        |        |        |
|                                                 | ADC header from   |        |        |        |        |        |
|                                                 | external source   |        |        |        |        |        |
|                                                 | while the test.   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Reads the input   |        |        |        |        |        |
|    adcStress_TEST                               | voltage provided  |        |        |   x    |   x    |   x    |
|                                                 | on ADC header.    |        |        |        |        |        |
|                                                 | Test is repeated  |        |        |        |        |        |
|                                                 | for 100 cycles.   |        |        |        |        |        |
|                                                 | Press 'b' to stop |        |        |        |        |        |
|                                                 | the test before   |        |        |        |        |        |
|                                                 | completing test   |        |        |        |        |        |
|                                                 | cycles.           |        |        |        |        |        |
|                                                 | Need to provide   |        |        |        |        |        |
|                                                 | voltage input on  |        |        |        |        |        |
|                                                 | ADC header from   |        |        |        |        |        |
|                                                 | external source   |        |        |        |        |        |
|                                                 | while the test.   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies boot     |        |        |        |        |        |
|    bootEeprom_TEST                              | EEPROM by writing |    x   |    x   |    x   |    x   |        |
|                                                 | a block of data,  |        |        |        |        |        |
|                                                 | reading back      |        |        |        |        |        |
|                                                 | written data      |        |        |        |        |        |
|                                                 | for correctness.  |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies boot     |        |        |        |        |        |
|    bootEepromStress_TEST                        | EEPROM read/write |    x   |    x   |    x   |    x   |        |
|                                                 | covering entire   |        |        |        |        |        |
|                                                 | memory.           |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies boot mode|        |        |        |        |        |
|    bootSwitch_TEST                              | switch by         |    x   |    x   |    x   |    x   |    x   |
|                                                 | configuring boot  |        |        |        |        |        |
|                                                 | strap pins as     |        |        |        |        |        |
|                                                 | GPIOs and reading |        |        |        |        |        |
|                                                 | the pin state with|        |        |        |        |        |
|                                                 | boot switch set in|        |        |        |        |        |
|                                                 | different patterns|        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies push     |        |        |        |        |        |
|    button_TEST                                  | buttons on the    |    x   |    x   |        |        |    x   |
|                                                 | board. Test       |        |        |        |        |        |
|                                                 | prompts for       |        |        |        |        |        |
|                                                 | pressing a        |        |        |        |        |        |
|                                                 | specific button   |        |        |        |        |        |
|                                                 | which will be     |        |        |        |        |        |
|                                                 | detected by the   |        |        |        |        |        |
|                                                 | test.             |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies clock    |        |        |        |        |        |
|    clockGen_TEST                                | generator modules |        |        |   x    |   x    |        |
|                                                 | on the board.     |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies csirx    |        |        |        |        |        |
|    csirx_TEST                                   | port on the board |        |        |   x    |        |        |
|                                                 | by receiving test |        |        |        |        |        |
|                                                 | pattern from csi  |        |        |        |        |        |
|                                                 | fpd hub and       |        |        |        |        |        |
|                                                 | displaying it on  |        |        |        |        |        |
|                                                 | HDMI monitor.     |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Read voltage,     |        |        |        |        |        |
|    currentMonitor_TEST                          | current on I2C    |   x    |   x    |   x    |   x    |   x    |
|                                                 | devices           |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Read voltage,     |        |        |        |        |        |
|    currentMonitorStress_TEST                    | current on I2C    |   x    |   x    |   x    |   x    |   x    |
|                                                 | devices. Test is  |        |        |        |        |        |
|                                                 | repeated for 100  |        |        |        |        |        |
|                                                 | cycles. Press 'b' |        |        |        |        |        |
|                                                 | to stop the test  |        |        |        |        |        |
|                                                 | before completing |        |        |        |        |        |
|                                                 | test cycles.      |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies eDP      |        |        |        |        |        |
|    displayPort_TEST                             | display port on   |        |        |   x    |        |        |
|                                                 | the board by      |        |        |        |        |        |
|                                                 | displaying        |        |        |        |        |        |
|                                                 | a color bar on    |        |        |        |        |        |
|                                                 | DP monitor.       |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies dsitx    |        |        |        |        |        |
|    dsitx_TEST                                   | display port on   |        |        |   x    |        |        |
|                                                 | the board by      |        |        |        |        |        |
|                                                 | displaying        |        |        |        |        |        |
|                                                 | a color bar on    |        |        |        |        |        |
|                                                 | the LCD.          |        |        |        |        |        |
|                                                 | Need to connect   |        |        |        |        |        |
|                                                 | a LCD which is    |        |        |        |        |        |
|                                                 | compatible with   |        |        |        |        |        |
|                                                 | FPD device used on|        |        |        |        |        |
|                                                 | the board for     |        |        |        |        |        |
|                                                 | running the test. |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Reads the EEPROM  |        |        |        |        |        |
|    eeprom_TEST                                  | and prints out the|    x   |    x   |    x   |   x    |   x    |
|                                                 | board's ID        |        |        |        |        |        |
|                                                 | information.      |        |        |        |        |        |
|                                                 | Passes on         |        |        |        |        |        |
|                                                 | successful I2C    |        |        |        |        |        |
|                                                 | reads. EEPROM will|        |        |        |        |        |
|                                                 | need to be        |        |        |        |        |        |
|                                                 | programmed prior  |        |        |        |        |        |
|                                                 | in order for a    |        |        |        |        |        |
|                                                 | correct read.     |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Writes to and read|        |        |        |        |        |
|    emmc_TEST                                    | from eMMC memory. |    x   |    x   |    x   |    x   |    x   |
|                                                 | Passes on reading |        |        |        |        |        |
|                                                 | back the correct  |        |        |        |        |        |
|                                                 | value as the one  |        |        |        |        |        |
|                                                 | written           |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Writes to and read|        |        |        |        |        |
|    emmcStress_TEST                              | from eMMC memory. |    x   |    x   |    x   |    x   |    x   |
|                                                 | Test covers the   |        |        |        |        |        |
|                                                 | entire eMMC memory|        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies ICSSG    |        |        |        |        |        |
|    enetIcssg_TEST                               | ENET ports in     |   x    |   x    |        |        |        |
|                                                 | loopback with one |        |        |        |        |        |
|                                                 | port connected to |        |        |        |        |        |
|                                                 | another port.     |        |        |        |        |        |
|                                                 | 100 packets are   |        |        |        |        |        |
|                                                 | sent and received |        |        |        |        |        |
|                                                 | during the test.  |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Test for setting  |        |        |        |        |        |
|    extRtc_TEST                                  | date and time to  |        |        |        |        |        |
|                                                 | external RTC and  |   x    |   x    |   x    |    x   |        |
|                                                 | running the clock |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Test for setting  |        |        |        |        |        |
|    extRtcStress_TEST                            | date and time to  |        |        |        |        |        |
|                                                 | external RTC and  |   x    |   x    |   x    |    x   |        |
|                                                 | running the clock.|        |        |        |        |        |
|                                                 | Test is repeated  |        |        |        |        |        |
|                                                 | for 100 cycles.   |        |        |        |        |        |
|                                                 | Press 'b' to stop |        |        |        |        |        |
|                                                 | the test before   |        |        |        |        |        |
|                                                 | completing test   |        |        |        |        |        |
|                                                 | cycles.           |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | The main          |        |        |        |        |        |
|    framework(app)                               | diagnostic        |    x   |    x   |    x   |   x    |        |
|                                                 | application. This |        |        |        |        |        |
|                                                 | is loaded by SBL  |        |        |        |        |        |
|                                                 | and can load other|        |        |        |        |        |
|                                                 | diagnostic        |        |        |        |        |        |
|                                                 | applications on   |        |        |        |        |        |
|                                                 | the SD card.      |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies HDMI     |        |        |        |        |        |
|    hdmi_TEST                                    | display port on   |        |        |   x    |        |        |
|                                                 | the board by      |        |        |        |        |        |
|                                                 | displaying        |        |        |        |        |        |
|                                                 | a color bar on    |        |        |        |        |        |
|                                                 | HDMI monitor.     |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Tests the Hyperbus|        |        |        |        |        |
|    hyperbus_TEST                                | by writing        |        |        |   x    |   x    |        |
|                                                 | and reading back  |        |        |        |        |        |
|                                                 | the value written |        |        |        |        |        |
|                                                 | to memory. Test   |        |        |        |        |        |
|                                                 | passes on correct |        |        |        |        |        |
|                                                 | data read back.   |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Cycles through    |        |        |        |        |        |
|    icssgLed_TEST                                | LEDs on the IDK   |        |    x   |        |        |        |
|                                                 | application       |        |        |        |        |        |
|                                                 | board.            |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Cycles through    |        |        |        |        |        |
|    icssgLedStress_TEST                          | LEDs on the IDK   |        |    x   |        |        |        |
|                                                 | application       |        |        |        |        |        |
|                                                 | board.            |        |        |        |        |        |
|                                                 | Test is repeated  |        |        |        |        |        |
|                                                 | for 100 cycles.   |        |        |        |        |        |
|                                                 | Press 'b' to stop |        |        |        |        |        |
|                                                 | the test before   |        |        |        |        |        |
|                                                 | completing test   |        |        |        |        |        |
|                                                 | cycles.           |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Tests LCD display |   x    |        |        |        |        |
|    lcd_TEST                                     | output and touch  |        |        |        |        |        |
|                                                 | input             |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Cycles through    |        |        |        |        |        |
|    led_TEST                                     | GPIO LEDs on the  |    x   |    x   |    x   |    x   |    x   |
|                                                 | board. Requires   |        |        |        |        |        |
|                                                 | user to verify    |        |        |        |        |        |
|                                                 | the LEDs blink.   |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Cycles through    |        |        |        |        |        |
|    ledStress_TEST                               | GPIO LEDs on the  |    x   |    x   |    x   |    x   |    x   |
|                                                 | board. Requires   |        |        |        |        |        |
|                                                 | user to verify    |        |        |        |        |        |
|                                                 | the LEDs blink.   |        |        |        |        |        |
|                                                 | Test is repeated  |        |        |        |        |        |
|                                                 | for 100 cycles.   |        |        |        |        |        |
|                                                 | Press 'b' to stop |        |        |        |        |        |
|                                                 | the test before   |        |        |        |        |        |
|                                                 | completing test   |        |        |        |        |        |
|                                                 | cycles.           |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Cycles through the|        |        |        |        |        |
|    ledIndustrial_TEST                           | I2C LEDs on the   |   x    |   x    |        |        |    x   |
|                                                 | board. Requires   |        |        |        |        |        |
|                                                 | user to verify    |        |        |        |        |        |
|                                                 | LEDs blink.       |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Cycles through the|        |        |        |        |    x   |
|    ledIndustrialStress_TEST                     | I2C LEDs on the   |   x    |   x    |        |        |        |
|                                                 | board. Requires   |        |        |        |        |        |
|                                                 | user to verify    |        |        |        |        |        |
|                                                 | LEDs blink.       |        |        |        |        |        |
|                                                 | Test is repeated  |        |        |        |        |        |
|                                                 | for 100 cycles.   |        |        |        |        |        |
|                                                 | Press 'b' to stop |        |        |        |        |        |
|                                                 | the test before   |        |        |        |        |        |
|                                                 | completing test   |        |        |        |        |        |
|                                                 | cycles.           |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies LIN      |        |        |        |        |        |
|    lin_TEST                                     | ports on the      |        |        |   x    |    x   |        |
|                                                 | board with two    |        |        |        |        |        |
|                                                 | ports connected   |        |        |        |        |        |
|                                                 | with each other.  |        |        |        |        |        |
|                                                 | Data is sent from |        |        |        |        |        |
|                                                 | one port and      |        |        |        |        |        |
|                                                 | received on       |        |        |        |        |        |
|                                                 | another port. Both|        |        |        |        |        |
|                                                 | ports are         |        |        |        |        |        |
|                                                 | veirified for Tx  |        |        |        |        |        |
|                                                 | and Rx            |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies MCAN     |        |        |        |        |        |
|    mcan_TEST                                    | ports on the      |        |    x   |    x   |    x   |    x   |
|                                                 | board with two    |        |        |        |        |        |
|                                                 | ports connected   |        |        |        |        |        |
|                                                 | with each other.  |        |        |        |        |        |
|                                                 | Data is sent from |        |        |        |        |        |
|                                                 | one port and      |        |        |        |        |        |
|                                                 | received on       |        |        |        |        |        |
|                                                 | another port. Both|        |        |        |        |        |
|                                                 | ports are         |        |        |        |        |        |
|                                                 | veirified for Tx  |        |        |        |        |        |
|                                                 | and Rx            |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies MCAN     |        |        |        |        |        |
|    mcanStress_TEST                              | ports on the      |        |    x   |    x   |    x   |    x   |
|                                                 | board with two    |        |        |        |        |        |
|                                                 | ports connected   |        |        |        |        |        |
|                                                 | with each other.  |        |        |        |        |        |
|                                                 | 10240 packets     |        |        |        |        |        |
|                                                 | are sent from     |        |        |        |        |        |
|                                                 | one port and      |        |        |        |        |        |
|                                                 | received on       |        |        |        |        |        |
|                                                 | another port. Both|        |        |        |        |        |
|                                                 | ports are         |        |        |        |        |        |
|                                                 | veirified for Tx  |        |        |        |        |        |
|                                                 | and Rx            |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Writes and reads  |        |        |        |        |        |
|    mem_TEST                                     | to external (DDR) |   x    |   x    |   x    |   x    |    x   |
|                                                 | memory of the     |        |        |        |        |        |
|                                                 | board. Value      |        |        |        |        |        |
|                                                 | written/read is   |        |        |        |        |        |
|                                                 | the address of    |        |        |        |        |        |
|                                                 | the word. This is |        |        |        |        |        |
|                                                 | done two times,   |        |        |        |        |        |
|                                                 | for value and     |        |        |        |        |        |
|                                                 | ~value            |        |        |        |        |        |
|                                                 | (complement), to  |        |        |        |        |        |
|                                                 | test for all bits.|        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Writes and reads  |        |        |        |        |        |
|    memStress_TEST                               | to external (DDR) |   x    |   x    |   x    |   x    |    x   |
|                                                 | memory of the     |        |        |        |        |        |
|                                                 | board. Walking 1's|        |        |        |        |        |
|                                                 | and walking 0's   |        |        |        |        |        |
|                                                 | tests are executed|        |        |        |        |        |
|                                                 | on the whole DDR  |        |        |        |        |        |
|                                                 | memory            |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Writes to and     |        |        |        |        |        |
|    mmcsd_TEST                                   | read from MMCSD   |   x    |   x    |   x    |   x    |    x   |
|                                                 | memory. Passes on |        |        |        |        |        |
|                                                 | reading back the  |        |        |        |        |        |
|                                                 | correct value as  |        |        |        |        |        |
|                                                 | the one written   |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Writes to and     |        |        |        |        |        |
|    mmcsdStress_TEST                             | read from MMCSD   |   x    |   x    |   x    |   x    |    x   |
|                                                 | memory. Passes on |        |        |        |        |        |
|                                                 | reading back the  |        |        |        |        |        |
|                                                 | correct value as  |        |        |        |        |        |
|                                                 | the one written.  |        |        |        |        |        |
|                                                 | Entire SD card    |        |        |        |        |        |
|                                                 | memory starting   |        |        |        |        |        |
|                                                 | from 1.5GB offset |        |        |        |        |        |
|                                                 | is written/read   |        |        |        |        |        |
|                                                 | during the test.  |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Tests reading and |        |        |        |        |        |
|    norflash_TEST                                | writing to NOR    |   x    |   x    |   x    |   x    |        |
|                                                 | flash memory      |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Tests reading and |        |        |        |        |        |
|    norflashStress_TEST                          | writing to NOR    |   x    |   x    |   x    |   x    |        |
|                                                 | flash memory.     |        |        |        |        |        |
|                                                 | Entire NOR flash  |        |        |        |        |        |
|                                                 | memory is accessed|        |        |        |        |        |
|                                                 | during the test.  |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Tests the OLED    |        |        |        |        |        |
|    oled_TEST                                    | display by        |        |        |        |        |   x    |
|                                                 | displaying test   |        |        |        |        |        |
|                                                 | messages on the   |        |        |        |        |        |
|                                                 | oled panel.       |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Tests the Octal   |        |        |        |        |        |
|    ospi_TEST                                    | SPI by writing    |   x    |   x    |   x    |   x    |   x    |
|                                                 | and reading back  |        |        |        |        |        |
|                                                 | the value written |        |        |        |        |        |
|                                                 | to memory. Test   |        |        |        |        |        |
|                                                 | passes on correct |        |        |        |        |        |
|                                                 | data read back.   |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Tests the Octal   |        |        |        |        |        |
|    ospiStress_TEST                              | SPI by writing    |   x    |   x    |   x    |   x    |   x    |
|                                                 | and reading back  |        |        |        |        |        |
|                                                 | the value written |        |        |        |        |        |
|                                                 | to memory. Test   |        |        |        |        |        |
|                                                 | passes on correct |        |        |        |        |        |
|                                                 | data read back.   |        |        |        |        |        |
|                                                 | Entire OSPI flash |        |        |        |        |        |
|                                                 | memory is accessed|        |        |        |        |        |
|                                                 | during the test.  |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Tests the PCIe    |        |        |        |        |        |
|    pcie_TEST                                    | interface in      |   x    |   x    |        |        |        |
|                                                 | end point and     |        |        |        |        |        |
|                                                 | rootcomplex mode  |        |        |        |        |        |
|                                                 | using two boards. |        |        |        |        |        |
|                                                 | Data is sent from |        |        |        |        |        |
|                                                 | one board to other|        |        |        |        |        |
|                                                 | and sent it back  |        |        |        |        |        |
|                                                 | to the first board|        |        |        |        |        |
|                                                 | for verification. |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies PMIC     |        |        |        |        |        |
|    pmic_TEST                                    | access and setting|        |        |   x    |   x    |        |
|                                                 | the PMIC voltages |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Tests the rotary  |        |   x    |        |        |        |
|    rotarySwitch_TEST                            | switch at the     |        |        |        |        |        |
|                                                 | 10 possible       |        |        |        |        |        |
|                                                 | positions         |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies PRU UART |        |        |        |        |        |
|    rs485_TEST                                   | port on the       |        |    x   |        |    x   |        |
|                                                 | board.            |        |        |        |        |        |
|                                                 | Supports board to |        |        |        |        |        |
|                                                 | board test and    |        |        |        |        |        |
|                                                 | single board test.|        |        |        |        |        |
|                                                 | RS485 to RS232    |        |        |        |        |        |
|                                                 | coverter is needed|        |        |        |        |        |
|                                                 | to run the test on|        |        |        |        |        |
|                                                 | AM65xx platform   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies PRU UART |        |        |        |        |        |
|    rs485Stress_TEST                             | port on the       |        |    x   |        |    x   |        |
|                                                 | board.            |        |        |        |        |        |
|                                                 | Sends 10MB of data|        |        |        |        |        |
|                                                 | from the board to |        |        |        |        |        |
|                                                 | serial console.   |        |        |        |        |        |
|                                                 | Teraterm script   |        |        |        |        |        |
|                                                 | loops the data    |        |        |        |        |        |
|                                                 | back to the board.|        |        |        |        |        |
|                                                 | Data recieved on  |        |        |        |        |        |
|                                                 | the board and     |        |        |        |        |        |
|                                                 | verified.         |        |        |        |        |        |
|                                                 | RS485 to RS232    |        |        |        |        |        |
|                                                 | coverter is needed|        |        |        |        |        |
|                                                 | to run the test on|        |        |        |        |        |
|                                                 | AM65xx platform.  |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
|                                                 | Need to run this  |        |        |        |        |        |
|                                                 | test from CCS.    |        |        |        |        |        |
|                                                 | SD boot support is|        |        |        |        |        |
|                                                 | not available.    |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies SPI      |        |        |        |        |        |
|    spiEeprom_TEST                               | EEPROM by writing |        |        |        |        |   x    |
|                                                 | a block of data,  |        |        |        |        |        |
|                                                 | reading back      |        |        |        |        |        |
|                                                 | written data      |        |        |        |        |        |
|                                                 | for correctness.  |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Tests reading     |        |        |        |        |        |
|    temperature_TEST                             | back from         |   x    |   x    |   x    |   x    |   x    |
|                                                 | temperature sensor|        |        |        |        |        |
|                                                 | via I2C. Test     |        |        |        |        |        |
|                                                 | passes on         |        |        |        |        |        |
|                                                 | successful I2C    |        |        |        |        |        |
|                                                 | reads.            |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Tests reading     |        |        |        |        |        |
|    temperatureStress_TEST                       | back from         |   x    |   x    |   x    |   x    |   x    |
|                                                 | temperature sensor|        |        |        |        |        |
|                                                 | via I2C. Test     |        |        |        |        |        |
|                                                 | passes on         |        |        |        |        |        |
|                                                 | successful I2C    |        |        |        |        |        |
|                                                 | reads.            |        |        |        |        |        |
|                                                 | Test is repeated  |        |        |        |        |        |
|                                                 | for 100 cycles.   |        |        |        |        |        |
|                                                 | Press 'b' to stop |        |        |        |        |        |
|                                                 | the test before   |        |        |        |        |        |
|                                                 | completing test   |        |        |        |        |        |
|                                                 | cycles.           |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Data Path         |        |        |        |        |        |
|    uart_TEST                                    | continuity test   |   x    |   x    |   x    |   x    |   x    |
|                                                 | for UART output.  |        |        |        |        |        |
|                                                 | Requires user to  |        |        |        |        |        |
|                                                 | verify that       |        |        |        |        |        |
|                                                 | outputs do appear |        |        |        |        |        |
|                                                 | on console.       |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies UART port|        |        |        |        |        |
|    uartStress_TEST                              | with large block  |   x    |   x    |   x    |   x    |   x    |
|                                                 | of data transfer. |        |        |        |        |        |
|                                                 | Sends 10MB of data|        |        |        |        |        |
|                                                 | from the board to |        |        |        |        |        |
|                                                 | serial console.   |        |        |        |        |        |
|                                                 | Teraterm script   |        |        |        |        |        |
|                                                 | loops the data    |        |        |        |        |        |
|                                                 | back to the board.|        |        |        |        |        |
|                                                 | Data recieved on  |        |        |        |        |        |
|                                                 | the board and     |        |        |        |        |        |
|                                                 | verified.         |        |        |        |        |        |
|                                                 | RS485 to RS232    |        |        |        |        |        |
|                                                 | coverter is needed|        |        |        |        |        |
|                                                 | to run the test on|        |        |        |        |        |
|                                                 | AM65xx platform.  |        |        |        |        |        |
|                                                 |                   |        |        |        |        |        |
|                                                 | Need to run this  |        |        |        |        |        |
|                                                 | test from CCS.    |        |        |        |        |        |
|                                                 | SD boot support is|        |        |        |        |        |
|                                                 | not available.    |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies the USB  |        |        |        |        |        |
|    usbDevice_TEST                               | device mode       |   x    |   x    |        |        |        |
|                                                 | operation of      |        |        |        |        |        |
|                                                 | board under test. |        |        |        |        |        |
|                                                 | USB modules       |        |        |        |        |        |
|                                                 | operates at high  |        |        |        |        |        |
|                                                 | speed (2.0)       |        |        |        |        |        |
|                                                 | Board is exposed  |        |        |        |        |        |
|                                                 | as USB MSC device |        |        |        |        |        |
|                                                 | to host PC during |        |        |        |        |        |
|                                                 | the test.         |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies the USB  |        |        |        |        |        |
|    usbHost_TEST                                 | host mode         |   x    |   x    |        |        |        |
|                                                 | operation of      |        |        |        |        |        |
|                                                 | boardf under test.|        |        |        |        |        |
|                                                 | USB modules       |        |        |        |        |        |
|                                                 | operates at high  |        |        |        |        |        |
|                                                 | speed (2.0)       |        |        |        |        |        |
|                                                 | during the test.  |        |        |        |        |        |
|                                                 | File write/read   |        |        |        |        |        |
|                                                 | and data          |        |        |        |        |        |
|                                                 | verification on   |        |        |        |        |        |
|                                                 | the connected USB |        |        |        |        |        |
|                                                 | device is done    |        |        |        |        |        |
|                                                 | during the test   |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies the USB  |        |        |        |        |        |
|    usbHostStress_TEST                           | host mode         |   x    |   x    |        |        |        |
|                                                 | operation of      |        |        |        |        |        |
|                                                 | boardf under test.|        |        |        |        |        |
|                                                 | USB modules       |        |        |        |        |        |
|                                                 | operates at high  |        |        |        |        |        |
|                                                 | speed (2.0)       |        |        |        |        |        |
|                                                 | during the test.  |        |        |        |        |        |
|                                                 | File write/read   |        |        |        |        |        |
|                                                 | and data          |        |        |        |        |        |
|                                                 | verification on   |        |        |        |        |        |
|                                                 | the connected USB |        |        |        |        |        |
|                                                 | device is done    |        |        |        |        |        |
|                                                 | during the test   |        |        |        |        |        |
|                                                 | Test is repeated  |        |        |        |        |        |
|                                                 | for 100 cycles.   |        |        |        |        |        |
|                                                 | Press 'b' to stop |        |        |        |        |        |
|                                                 | the test before   |        |        |        |        |        |
|                                                 | completing test   |        |        |        |        |        |
|                                                 | cycles.           |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+
|                                                 | Verifies basic    |        |        |        |        |        |
|    Power On Self Test                           | memory devices    |   x    |    x   |        |        |        |
|                                                 | on the board and  |        |        |        |        |        |
|                                                 | displays the      |        |        |        |        |        |
|                                                 | board ID details. |        |        |        |        |        |
|                                                 | Executed on boot  |        |        |        |        |        |
|                                                 | automatically     |        |        |        |        |        |
|                                                 | before displaying |        |        |        |        |        |
|                                                 | diag main menu.   |        |        |        |        |        |
|                                                 | Can be skipped by |        |        |        |        |        |
|                                                 | entering 'b' in   |        |        |        |        |        |
|                                                 | the serial console|        |        |        |        |        |
|                                                 | within 5 secs of  |        |        |        |        |        |
|                                                 | diag boot.        |        |        |        |        |        |
+-------------------------------------------------+-------------------+--------+--------+--------+--------+--------+

