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/TMS320F28027F: ADC only runs on RAM - not on FLASH memory

Part Number: TMS320F28027F
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi there,

first of all, I'm using CCS v8.0.0 and the C2000 Launchpad with TMS320F28027F.

The "Example_2802xAdcTempSensor" in CCS from C2000Ware is running on RAM. In the debug-mode, I can see the changing temperature values of the internal temperature sensor.

I want to run this example on the FLASH memory, because i need an AD-conversion for an other project.

In this example, there is the linker file "F2802x_generic_ram.cmd" included.

So I included the "F2802x_generic_flash.cmd" - file and excluded the "..._generic_ram.cmd" - file from build. To check if the program still runs, I toggle an output pin when the temp. value is smaller than a reference value (< 1940). With the RAM-file the program works, with the FLASH-file not.

While debugging and bulding the example, there is no error or warning shown.

Is there anybody out there who can help me to run the ADC while using the FLASH memory?

Thank you

Best regards

Simon

  • When running from flash, were you only running standalone or were you running with the debugger connected? If the latter, can you give more detail about how it was failing?

    I tried this out myself with the ADC temp sensor example and found that there were some issues with the self calibration function when running from flash. I believe the cause was what Devin is describing here:

    e2e.ti.com/.../549412

    Can you confirm that your issue appears to be similar and do as Devin suggests?

    Thanks,
    Whitney
  • Hi Whitney,

    Thank you for your answer. I’m running with the debugger connected. I will check this on monday and give you reply.

    Best regards

    Simon

  • Hello Whitney,

    I don't know how to solve the problem with the self calibration. I don't get an error like Yi Zhang (Devins solution).

    In the following pictures, there are the screens of my debugging window.

    This screen is from running on RAM. I get the values of the temp sensor in yellow background.

    This screen is from running on FLASH. I don't get the values of the temp sensor. But there is no error!

    The same problem occurs when I comment out the AdcOffsetSelfCal(). The difference is that the program jumps into the ILLEGAL_ISR(void). I don't know how to interpret that.

    Can anyone give some hints?

    Thank you

    Best regards

    Simon

  • Hi Simon,

    Have you been able to make any debug progress? If you haven't already, please try rewriting AdcConversion() to use software triggers using ADCSOCFRC1 instead of interrupt triggers, and see if it removes the race condition that you're running into now.

    Whitney
  • Hi Whitney,

    thank you for your advice.

    I used the EPWM to trigger the Interrupt and now the ADC is running on the flash memory.

    Thank you! My problem is solved.

    Simon