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/TMS320F28379D: Help with ADC_soc_continuous

Part Number: TMS320F28379D
Other Parts Discussed in Thread: TMS320F28377D, CONTROLSUITE

Tool/software: Code Composer Studio

Hello,

I am having trouble making adc_soc_continuous example works on my TMS320F28379D.
It build and compile well.

But then it seems it is not able to save the measurement in the memory.

When I plug A0 pin (pin9) on 3.3V pin I can observe AdcaResultRegs.ADCRESULT0 register up to T7 that goes to 4095 but the AdcaResults table stays at 0 while it should copy the value on the registers acording to this piece of the code:

"           AdcaResults[resultsIndex++] = AdcaResultRegs.ADCRESULT0;
            AdcaResults[resultsIndex++] = AdcaResultRegs.ADCRESULT1;
            AdcaResults[resultsIndex++] = AdcaResultRegs.ADCRESULT2;
            AdcaResults[resultsIndex++] = AdcaResultRegs.ADCRESULT3;
            AdcaResults[resultsIndex++] = AdcaResultRegs.ADCRESULT4;
            AdcaResults[resultsIndex++] = AdcaResultRegs.ADCRESULT5;
            AdcaResults[resultsIndex++] = AdcaResultRegs.ADCRESULT6;
            AdcaResults[resultsIndex++] = AdcaResultRegs.ADCRESULT7;"

So there is no copy in the table and the "resultsIndex" stays at 0.

when looking at the part of the code just before I have:

 "      //
        //software force start SOC0 to SOC7
        //
        AdcaRegs.ADCSOCFRC1.all = 0x00FF;

        //
        //keep taking samples until the results buffer is full
        //
        while(resultsIndex < RESULTS_BUFFER_SIZE)
        {
            //
            //wait for first set of 8 conversions to complete
            //
            while(0 == AdcaRegs.ADCINTFLG.bit.ADCINT3);

            //
            //clear both INT flags generated by first 8 conversions
            //
            AdcaRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;
            AdcaRegs.ADCINTFLGCLR.bit.ADCINT3 = 1;"

and I think that my problems lay here: when looking at the Flags AdcaRegs.ADCINTFLG.bit.ADCINT3 and AdcaRegs.ADCINTFLGCLR.bit.ADCINT1 they are always at 0.

Does someone met this problem before ?

Your help would be very much apreciated.

Thanks

  • Hello,

    Have you made any changes at all to either the code or the project settings? I have run this example as-is and didn't have any trouble with it.

    If you place a breakpoint on the line that reads from ADCRESULT0, can you reach it or do you get stuck at the while loop that waits for ADCINTFLG.ADCINT3 to become nonzero?

    Thanks,

    Whitney

  • Hello Witney,

    I didn't change anything on the code yet.

    I get stock at " while(0 == AdcaRegs.ADCINTFLG.bit.ADCINT3);" their is not flag generated for some reason.

  • Are you using a Launchpad? Make sure to add _LAUNCHXL_F28379D to your predefined symbols in your project settings so that the SYSCLK will be configured correctly.

    What version of device support are you using?

    Whitney
  • I tried adding "add _LAUNCHXL_F28379D" in Project => Properties => Build => C2000 Compiler => Advanced Options => Predefined symbols
    but I end up with the following failure when building the project:
    >> Compilation failure
    subdir_rules.mk:79: recipe for target 'adc_soc_continuous_cpu01.obj' failed
    >> WARNING: more than one source file is specified; preprocessor output will be generated for last file only
    Fatal error #1965: cannot open source file "_LAUNCHXL_F28379D"
    1 catastrophic error detected in the compilation of "_LAUNCHXL_F28379D".
    Compilation terminated.
    gmake: *** [adc_soc_continuous_cpu01.obj] Error 1
    gmake: Target 'all' not remade because of errors.

    Also I have "Generic c28xxDevice" in the project properties => General
    I took the example in ControleSuite/device support/TMS320F2837xD ../.. v210 / ...Cpu1
    The target configuration is TMS320F28377D but I have a TMS320F28379D, but other files example worked well. so I am not sure the problem lies here.

    If I try changing the Target configuration for the F28379D I get a lot of building errors regarding the Memory as below:

    "C:/ti/controlSUITE/device_support/F2837xD/v210/F2837xD_common/cmd/2837xD_RAM_lnk_cpu1.cmd", line 7: error #10263:
       BEGIN memory range has already been specified
    "C:/ti/controlSUITE/device_support/F2837xD/v210/F2837xD_common/cmd/2837xD_RAM_lnk_cpu1.cmd", line 7: error #10264:
       BEGIN memory range overlaps existing memory range BEGIN
    "C:/ti/controlSUITE/device_support/F2837xD/v210/F2837xD_common/cmd/2837xD_RAM_lnk_cpu1.cmd", line 8: error #10263:
       RAMM0 memory range has already been specified
    "C:/ti/controlSUITE/device_support/F2837xD/v210/F2837xD_common/cmd/2837xD_RAM_lnk_cpu1.cmd", line 8: error #10264:
       RAMM0 memory range overlaps existing memory range RAMM0
    "C:/ti/controlSUITE/device_support/F2837xD/v210/F2837xD_common/cmd/2837xD_RAM_lnk_cpu1.cmd", line 9: error #10263:
       RAMD0 memory range has already been specified
    "C:/ti/controlSUITE/device_support/F2837xD/v210/F2837xD_common/cmd/2837xD_RAM_lnk_cpu1.cmd", line 9: error #10264:
       RAMD0 memory range overlaps existing memory range RAMD0
    "C:/ti/controlSUITE/device_support/F2837xD/v210/F2837xD_common/cmd/2837xD_RAM_lnk_cpu1.cmd", line 10: error #10263:
       RAMLS0 memory range has already been specified
    "C:/ti/controlSUITE/device_support/F2837xD/v210/F2837xD_common/cmd/2837xD_RAM_lnk_cpu1.cmd", line 10: error #10264:
       RAMLS0 memory range overlaps existing memory range RAMLS0

    thanks for your help,