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.

Understanding DSPLink error codes

From Texas Instruments Wiki
Jump to: navigation, search

END OF LIFE

DSP Link is still available for download, but no further releases or updates are planned. Please see IPC Software Options for details and alternatives.

Overview[edit]

DSPLink returns different error codes for different kinds of failures. Several times, just the error code value returned from the function is sufficient to understand the cause of the failure, and it can be directly corrected.

GPP-side codes[edit]

The return values are of two types:

  • Success codes: These are positive integers having value 0x8nnn. For example, the common success code DSP_SOK has value 0x8000.
  • Failure codes: These are negative integers having value 0x8nnnnnnn. For example, generic failure code DSP_EFAIL has value 0x80008008
  • The complete set of return values and their meaning is documented in the error code mapping file errbase.h at ${DSPLINK}/gpp/inc/errbase.h
  • The expected return values from each API are documented in the [MODULE].h file. Each [MODULE].h file contains information about all APIs supported by that module, their arguments, return values, entry and leave conditions. For example, proc.h file contains all information about all APIs supported by PROC module. The GPP-side module headers are located in ${DSPLINK}/gpp/inc folder.
  • The APIs are also documented in API source reference doxygen generated documentation available with every DSPLink release.

DSP-side status codes[edit]

  • On DSP-side the return values for DSPLink APIs match DSP/BIOSTM status codes.
  • DSP/BIOS status codes are detailed in DSP/BIOS documentation and within the sys.h DSP/BIOS header file.
  • In addition, DSPLink defines its own error codes for RingIO component, starting from the SYS_USER value as supported by DSP/BIOS.
  • The expected return values from each API are documented in the [MODULE].h file. Each [MODULE].h file contains information about all APIs supported by that module, their arguments, return values, entry and leave conditions. For example, notify.h file contains all information about all APIs supported by NOTIFY module. The DSP-side module headers are located in ${DSPLINK}/dsp/inc folder.
  • MSGQ, SIO and POOL modules are part of DSP/BIOS and are documented within DSP/BIOS user documentation.

Using DSPLink macros for checking error/success status[edit]

DSPLink provides macros DSP_SUCCEEDED and DSP_FAILED, which can be used to check whether a DSPLink API call has passed or failed.
These macros should be used for checking return status of all APIs instead of directly checking against status codes. Using these macros ensures that any change in/addition in/removal of return codes shall not impact applications developed using the DSPLink APIs.

Usage[edit]

The macros should be used in the following way: <syntaxhighlight lang=c> status = MSGQ_open (...) ; if (DSP_SUCCEEDED (status)) {

   ...

} </syntaxhighlight>

Constraints[edit]

This macros should not be used as: <syntaxhighlight lang=c> if (DSP_SUCCEEDED (MSGQ_open (...))) {

   ...

} </syntaxhighlight> Since DSP_SUCCEEDED is a macro, using it in the above manner can cause the function to be invoked multiple times.

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 Understanding DSPLink error codes 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 Understanding DSPLink error codes here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Understanding DSPLink error codes here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Understanding DSPLink error codes here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Understanding DSPLink error codes here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Understanding DSPLink error codes here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Understanding DSPLink error codes here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Understanding DSPLink error codes here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Understanding DSPLink error codes 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