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.

TMS320F280049: ADC calibration

Part Number: TMS320F280049

Hi,

 I am using this part as part of a CCS/C2000 project.

Not too familiar with the ADC calibration process, so I apologize ahead of time for my lack of understanding.

Currently this application is running under the debugger.

My understanding from the TMS320F28004x Piccolo Microcontrollers Technical Reference Manual:

From section 13.1.12 ADC Calibration -  The boot ROM will call the calibration functions, so trim values should be initially populated without user
intervention.

As we are running under the debugger, my understanding is that I would need to call Device_cal() from my code to accomplish ADC Calibration during this development phase.

However this function "Device_cal()" does not appear to be available and comes up undefined by the Linker, nor do I see it defined in any header file.

I've seen other Form posts showing this function being called for just this purpose so I'm unsure where the disconnect is.

Additionally, if when booting from ROM, the part calibrates the gain and offset of the ADC, then typically additional ADC Zero Offset Calibration (section13.1.12.1)  would not be necessary - is that correct?

Thank you!

Mark

  • Hi Mark,

    If the gel file you are using has a function call called Device_cal() but is empty, then running with the debugger will clear the calibration values.  To view the gel file, when you are in debugger, go to Tools->GEL Files, then double click on the *.gel file that would show up then search for the function Device_Cal().  If this function is empty, you can do this work around:

    - add this define statement on top of your program before the main function

      #define device_cal (void    (*)(void))0x70282       // this will define the pointer where the device calibration function resides in memory

    - add the call to the device_cal in your main program (NOTE: this will only take effect when the peripheral clocks are active/turned on)

      (*device_cal)();

    We've submitted a request to update the gel files in future releases so you should not have to do this workaround when using the debugger. ... and yes, when booting from ROM, ADC calibration is automatically called so executing Device_Cal is not necessary.

    Please let me know if this resolves your problem or if you have any other issues with this.

    Best regards,

    Joseph

  • Hi Mark,

    Let me know if this answers your question on ADC calibration with the debugger.  Closing this thread for now but if you still have issues on this topic, please feel free to post it in the forum.

    Thanks and regards,

    Joseph