NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

PDK/PDK DIAGNOSTICS User Guide

From Texas Instruments Wiki
Jump to: navigation, search
Pdk tda home page.png

Introduction[edit]

TI ADAS Diagnostic Library is a collection of software functions for diagnosing the health of various modules and interfaces of the device. The functions of this library can be called by user at Start of system, Runtime or System shutdown.

The diagnostic library supports the following functionalities

  • can be used to diagnose the functionality of the ADC module.
  • can be used to diagnose the ECC functionality of EMIF, OCMC & IPU modules.
  • can be used to configure CRC to calculate CRC signature of given data and verify its functionality.
  • can be used to test SPI internal loopback for various frequencies and modes for all 4 channels and verify its functionalities.
  • can be used to test the CAN internal/external loopback and ECC parity for DCAN1 and DCAN2 channels and verify its functionalities.


McSPI Diagnostic Library [edit]

The MCSPI is a master/slave synchronous serial bus. The MCSPI modules include:

  • Serial clock with programmable frequency, polarity, and phase for each channel
  • Selection of SPI word length (4 to 32 bits)
  • Full duplex/half duplex transfers in master mode.
  • Built-in FIFO for a single channel.

Diagnostics Test Description[edit]

  • Initialize all the input parameters by using default init function which initializes the input parameters to a default value.
  • Run the internal pad loopback by configuring the same signal as both input and output. Configure spim_d[0] as output and spim_d[1] as input and connect them.
  • Compare the values of the Tx and Rx buffers.
  • MCSPI can be tested in two modes:
    • DMA mode.
    • Polled mode.
  • In the interrupt mode, application has to register an ISR handler for the MCSPI interrupt in which DiagLib_mcspiProcISR has to be called.

Features tested[edit]

  • Test different instances of MCSPI module
  • Test different channels supported by each MCSPI instance.
  • Test for different frequencies: 1MHz, 48 MHz (Serial clock with programmable frequency)
  • Test for different modes: Mode 0, Mode 1, Mode 2, Mode 3 (polarity, and phase for each channel)
  • FIFO Buffer
  • Test for different word length (8,16 & 32 only supported for test)
  • Test MCSPI interrupts.


ECC Diagnostic Library[edit]

Error Correcting Code (ECC) bits is redundant data added along with the original data, which is a technique that helps in detecting as well as correcting errors. The ECC scheme used on the TDA2xx/TDA2Px/TDA2Ex/TDA3xx devices is able to detect up to 2-bit failures and correct single bit failures.

Diagnostics Test Description[edit]

  • DiagLib for ECC provides test on 3 modules:
    • EMIF - Quanta alignment address/write, SEC, DED.
    • OCMC - SEC, DED, ECC code Error.
    • IPU – L2 RAM/L1DATA/L1TAG SEC, DED, ECC Code Error.
  • Initialize all the input parameters by using default init function which initializes the input parameters to a default value.
  • It is mandatory to set the type of test and the address where error to be tested.
  • Write data to specified memory with ECC enabled. ECC will be generated.
  • Disable ECC and induce error in data.
  • Read data and check if ECC error interrupt is generated.
  • ECC can be tested in two modes:
    • Interrupt mode.
    • Polled mode – Not applicable for IPU and errors causing hard faults.
  • In the interrupt mode, application has to register an ISR handler for the respective module ECC interrupts in which DiagLib_eccProcISR has to be called.

Features tested[edit]

  • Support different IPs; EMIF, IPU, OCMC.
  • ECC Logic
  • Interrupts
  • IP Memory Read/Write Operations


CRC Diagnostic Library[edit]

The CRC module produces a signature for a given sequence of data values. The signature is generated through a feedback path from data bits. Identical input data sequences result in identical signatures when the CRC is initialized with a fixed seed value, whereas different sequences of input data, in general, result in different signatures.

Diagnostics Test Description[edit]

  • Initialize all the input parameters by using default init function which initializes the input parameters to a default value.
  • Calculate CRC of specified message through software implementation of CRC (C-Model).
  • Send the same message through CRC module to get HW CRC Value.
  • Compare CRC (Module) Value with predetermined CRC (C-Model) Value.
  • CRC can be tested in two modes:
    • Interrupt mode.
    • Polled mode.
  • In the interrupt mode, application has to register an ISR handler for the CRC interrupt in which DiagLib_crcProcISR has to be called.

Features tested[edit]

  • CRC registers of each channel.
  • All test support both DMA and CPU based mode
  • CRC Logic
  • Interrupts


ADC Diagnostic Library[edit]

The analog-to-digital converter (ADC) module is a successive-approximation register (SAR) general purpose analog-to-digital converter. The main features of the ADC include:

  • 10-bit data
  • 8 channels
  • 750 KSPS at 13.5-MHz ADC_CLK
  • Two modes of conversion - Single conversion (one-shot) & Continuous conversions.
  • Programmable FSM sequencer that supports 16 steps for averaging, open delay, sampling delay etc.
  • Two 64-deep FIFO for data storage.

Diagnostics Test Description[edit]

  • DiagLib for ADC provides 2 types of tests:
    • Test ADC conversions.
    • Test ADC overrun.
  • Initialize all the input parameters by using default init function which initializes the input parameters to a default value.
  • It is mandatory to configure the number of channels, input channel numbers and their corresponding expected voltages.
  • Any other parameter can be optionally modified as required by the USER application.
  • Test type has to be chosen and start test API has to be called from the application with appropriately populated input parameters.
  • ADC can be tested in two modes:
    • Interrupt mode.
    • Polled mode.
  • In the interrupt mode, application has to register an ISR handler for the ADC interrupts in which DiagLib_adcProcISR has to be called.

Features tested[edit]

  • Single shot mode & continuous mode for x samples
  • Range check
  • FIFO buffer – threshold, overrun.
  • All channel support
  • Interrupt and Polled mode.


CAN Diagnostic Library[edit]

The CAN module is a serial communications protocol which efficiently supports distributed real-time applications. CAN has high immunity to electrical interference and the ability to self-diagnose and repair data errors. In a CAN network, many short messages are broadcast to the entire network, which provides for data consistency in every node of the system.

Diagnostics Test Description[edit]

  • Initialize all the input parameters by using default init function which initializes the input parameters to a default value.
  • Run the internal and external pad loopback test.
  • Run the ecc parity test.
  • Any parameter can be optionally modified as required by the USER application
  • Compare the values of the Tx and Rx buffers.
  • Application has to register an ISR handler for the CAN interrupt in which DiagLib_CanISR has to be called.

Features tested[edit]

  • Test all instances of CAN module for loopback and parity – DCAN1 and DCAN2
  • Parity error interrupts
  • Single bit parity error detection and correction
  • Double bit parity error detection
  • TX and RX interrupts


Running Diagnostic Library Examples[edit]

Diag Test App[edit]

The example is present in path packages \ti\drv\stw_lld\examples\diag_test_app.
This app runs on tda2xx, tda2px, tda2ex and tda3xx. This app tests the functionality of the selected safety IPs. This app provides an example for the diagnosis of ADC, CRC, ECC(EMIF & OCMC), DCAN & McSPI modules.
The example provides the instance of

  • ADC singleshot & continuous conversions of multiple channels.
  • Inbuilt test CRC compression by comparing the CRC of default data with Golden CRC.
  • McSPI1 internal loopback functionality.
  • DCAN internal loopback functionality and single bit error correction.
  • ECC EMIF Non Quanta Multiple writes error.
  • ECC OCMC SEC error.

Note:

  • For EMIF ECC Test on Tda2xx/Tda2px/Tda3xx/Tda2ex, Before connecting the EVM to CCS through JTag, modify the gel files and then reload these gel files as stated below.
    • Enable the macro ENABLE_ECC in ddr config gel files. i.e., TDA2xx_ddr_config.gel (Tda2xx), TDA2Px_ddr_config.gel (Tda2px), TDA2Ex_ddr_config.gel(Tda2ex), TDA3xx_ddr_config.gel(Tda3xx).
  • For ADC Test connect the ADC setup as stated below.
    • Connect 665V to pin3 , 592V to pin5, 520V to pin 7 and 412V to pin 9

diag ipu ecc test[edit]

The example is present in path packages packages\ti\diag\examples\diag_ipu_ecc_test
This app runs on tda3xx. This app tests the error detection and correction functionalities of IPU in M4.
The example provides the instance of

  • IPU L2 RAM SEC, DED & Code error.
  • IPU L1 DATA SEC, DED & Code error.
  • IPU L1 TAG SEC, DED & Code error.

Note:

  • Only interrupt mode is supported for this test. The application registers IRQ handler inside which it calls a DiagLib_eccISR for respective modules.
  • Before loading binary on Cortex M4 core run the gel file script AMMU_config_IPU_ECC_Test from the gel file provided at location docs\gel\ECC_Diag_Cfg.gel


E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article PDK/PDK DIAGNOSTICS User Guide here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article PDK/PDK DIAGNOSTICS User Guide here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article PDK/PDK DIAGNOSTICS User Guide here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article PDK/PDK DIAGNOSTICS User Guide here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article PDK/PDK DIAGNOSTICS User Guide here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article PDK/PDK DIAGNOSTICS User Guide here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article PDK/PDK DIAGNOSTICS User Guide here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article PDK/PDK DIAGNOSTICS User Guide here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article PDK/PDK DIAGNOSTICS User Guide here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity