This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS1224: Safety Manual, MibADC Converter Calibration: can the HALCoGen fn adcCalibration be used for this?

Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN

The TI Safety Manual (SPNU550B, October 2012–Revised December 2015) contains the following:

Initially, I considered the HALCoGen fn adcCalibration() a good fit for this requirement but do note that this fn does not report any errors (it returns void) and cannot therefore fulfill the functionality implied by the text "Software must ... evaluate the result of this diagnostic. Error response, ... defined by the software implemented by the system integrator.".

A few questions:

  1. Am I correct in my assumption that the adcCalibration() implements the calibration referred to by section 7.81?
  2. Is there a practical limit to the number of time that the fn can apply its correcting offset?
  3. Are there circumstances where this fn could fail and what would the consequences be for such a failure (we are working to ASILC).?

Marcus

  • Hello Marcus,

    The datasheet specifies the ADC's total unadjusted error (TUE) as +/- 4 counts. The ADC calibration can account for the offset error component which is part of this total error. If the TUE is too large for your application, you can calibrate the ADC to remove any DC offset error.

    The SDL (safety diagnostic lib) has one API designed for ADC calibration. The function also checks the function arguments, ADC mode etc, and returns function returns the offset error and test status.

    There is no limit to the number of calibration. This calibration procedure can be performed at start-up, or periodically depending on how much the operating conditions change in your target application.

    Be aware of that the ADC self-test mode must be disabled during a calibration sequence. In addition, to ensure accurate results, calibrate the ADC in an environment with minimum noise.

  • Hi QJ, thanks for the prompt reply.

    RE:

    The SDL (safety diagnostic lib) has one API designed for ADC calibration

    I assume that selection of the SDL is something that is done when generating the HALCoGen code but unfortunately that was done before I joined the company, so is there a way to tell from the code that I do have, whether it was gen'ed with this enabled; for instance, what is the name of the function you  are referring to?

    Marcus 

  • Hi Marcus,

    HALCoGen was developed before SafeTI diagnostics library hence there are few overlapping Safety Diagnostics features between them. We continue to support HALCoGen diagnostics ( sys_selftest.c) for legacy reasons. We strongly recommend to use SafeTI Diagnostics library for Safety Functions.

    The ADC converter calibration can be mapped to SL_adcCalibration():

       (software safety manual in SDL installation folder)

  • Hi QJ, thanks for the clarification.

    Marcus