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.

CCS/TMS320F28035: TMDSCNCD28035

Part Number: TMS320F28035

Tool/software: Code Composer Studio

Hi
I am using the TMS320F28035 control card. When I try to calibrate the ADC using the functions provided by texas, AdcOffsetSelfCal () that is in the DSP2803x_Adc.c file, the program gets stuck in the line enclosed in red, all this when I loaded it in Flash Memory .

 If I remove the calibration and use the same interrupt flag in the while inside the void main() for several ADC conversions it works correctly (with software forced conversions). Obviously with incorrect offset. 

The AdcOffsetSelfCal () calibration works perfectly when loading in RAM. I'm using *.cmd files provided by texas, too. 28035_RAM_CLA_Ink.cmd for RAM memory and F28035.cmd for Flash memory

Hope you can help me.

Regards,

  • Hi Luis,

    If the code (non-ADC portions) is executing OK from flash otherwise, my guess is that running from flash is slowing down that tight loop too much, resulting in the code getting too far behind the ADC samples.  

    Try commenting out all but one of the "Sum += ..." lines in each half of the loop to see if it will run through (offset will not be correct). 

    If this is the issue, you might try copying that function to RAM before execution.  You can also collect the conversions on the internal VREFLO channel using a different method (e.g. SW force in a loop).  

  • Hi Devin,

    Thanks for the reply. Yes, all functions work correctly (Timer, PWM ...) from both FLASH and RAM. I just had that problem with that function in specific. I've used the forced software method and it's no longer stuck. For future works, the only solution is to load that method into RAM or do you think it is a specific situation? 

    Regards.

  • Hi Luis,

    My guess is that the function will only work as-is as a ramfunction, but I'll flag this as an issue for the software team to review and to potentially update the code.  

  • Thank you so much Devin.

    Regards