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.

F28M36P63C2: ADC Problem, Concerto F28M36

Part Number: F28M36P63C2
Other Parts Discussed in Thread: THS4031

we have some problems with ADC's. The simplest description of this problem is that we see sampled values that are repeated, despite of the fact that the applied signal has not the values that should lead to this repetition

Example:

applied signal ( programmed arbitrary signal with wave form generator)

example:

signal     sampled value

1.23V      956

1.56V      1245

1.97V      1245

2.15V      2049

2.78V      3045

and so on.

this repetion is not periodicaly and is not depending on sampling frequency. SOC Signals and EOC Signals were observed with oszilloskop and are correct. Same behavior can be observed using v220\F28M36x_examples_Control\epwm_adc_soc example from control suite.

For me it's looks like the conversion isn't ready although the EOC and Interrupt are generated or SOC Signal is not recieved although the SOC Signal is generated.

thank for your reply...

Kind regards,

Maxim

  • Maxim,

    Does the adc_soc example work for you? The epwm_adc_soc example has added complexity for debug.

    Are you resetting the device between runs? Sometimes triggers may carry over between runs, which can break event synchronization.

    Are you showing results from a single array of ADC conversions (such as Voltage1[]) or are you showing a combination of both VoltageN[] arrays?

    It might be helpful to sample a slow, continuous signal like a ramp or triangle wave so that we can more easily tell if the result is old or just overlapping.

    -Tommy
  • Hi Tommy,

    the problem is very reproducible. Reseting the device doesn't help.

    I applied different signals from sinus wave to triangle with different frequencies.  The problem remains.  

    Reducing the sampling frequency doesn't help too, but the frequency ( how often the same samples occure) varies. The problem occure with very slow sampled frequency ( 1kHz) too.

    Your quistion:

    Are you showing results from a single array of ADC conversions (such as Voltage1[]) or are you showing a combination of both VoltageN[] Arrays?

    -> I'm showing the results from one Array Voltage1

    thank you,

    Maxim

  • Maxim,

    Are you using a controlCARD for these experiments? Are you using the RAM build or FLASH build? Are you driving both SOC channels? Can you describe your signal source?

    I do see occasional repeated conversion values on my impromptu setup, but I think it is caused by poor signal conditioning on my part. As I increase my EPWM period, the repeated values go away, so it makes me think that what I am seeing is more likely to be noise related rather than state-machine race-condition related.

    -Tommy
  • Tommy,

    no i'm not using the controlCARD, i'm using our inhouse designed Controller Card. But i've measured the signal  which goes to the ADC pin and this is exactly the signal which is applied with signal generator. My signal source is oszilloscope Agillent MSO-X 4034A. There is small low pass filter ( very high cut-off frequency) between signal source and ADC pin.

    With high probabiIlty i can exclude the noise issue, because i tried the experiment with different signals and induced higher/lower noises.

    I've found a ControlCard which we have used initially. I'm going to run the experiment on this card. I will report about results in next post….

    I already completed the test on the original ControlCard. I have this issue on the Controller Card too. It's RAM version that i'm using.

    You' re right, the absolute frequency ( how ofter the repetition occurs) decrease with slower sampling frequency. But for me it's not a problem of noise.

    -Maxim

  • Maxim,

    Are you still suspecting a timing issue where we are reading old data? I have tried an experiment here to help eliminate that possibility.

    Using the epwm_adc_soc example, I set a breakpoint in the ADC ISR for when ConversionCount is reset to 0.

    For the first set of runs, I supply a slow voltage ramp on ADC1INA2, and I leave ADC1INA0 floating. At the breakpoint, I can see some repeated values in the Voltage2 array (ADC1INA2). In the Voltage1 array (ADC1INA0), I do not see any repeats.

    For the second set of runs, I reverse the setup so that ADCIN1A0 has a slow voltage ramp and ADCIN1A2 is floating. I then see repeats in Voltage1, but no repeats in Voltage2.

    To me, this suggests that we are not reading old ADC data.

    -Tommy
  • Maxim,

    It has been a while since your last update. I assume that you were able to resolve your issue. If this isn’t the case, please reject this resolution and reply to this thread. If this thread is locked, please make a new thread describing the current status of your issue.

    -Tommy
  • Maxim,

    You have indicated that you are still having issues. Can you provide an update?

    -Tommy
  • Tommy,

    thank you for catching the issue again. I thought, i gave you the information for reproducing. But unfortunately the information is not in the history.
    However, i modified the adc_soc_example, so you would see how repititions occure. Please observe "RepeatedSamples" variable with the signal you applied


    --------------------------------------------------------------------------------------------------
    Uint16 voltage_old;

    Uint32 RepeatedSamples = 0;
    Uint32 AllSamples = 0;
    Uint32 AbsoluteFrequency = 0;

    Uint32 debug_sum = 0;
    __interrupt void  adc1_isr( void )
    {
        AllSamples++;
        GpioG1DataRegs.GPASET.bit.GPIO13  = 1;

        Voltage1[ConversionCount] = Adc1Result.ADCRESULT0;
        if ( Voltage1[ConversionCount] == voltage_old){
            RepeatedSamples++;
            AbsoluteFrequency = AllSamples/RepeatedSamples;
        }
        Voltage2[ConversionCount] = Adc1Result.ADCRESULT1;

        voltage_old = Adc1Result.ADCRESULT0;
        voltage2_old = Adc1Result.ADCRESULT1;

        // If 20 conversions have been logged, start over
        if(ConversionCount == 9)
        {
            ConversionCount = 0;
        }
        else ConversionCount++;
        GpioG1DataRegs.GPACLEAR.bit.GPIO13  = 1;

        Adc1Regs.ADCINTFLGCLR.bit.ADCINT1 = 1;  //Clear ADCINT1 flag reinitialize
                                                // for next SOC
        PieCtrlRegs.PIEACK.all = PIEACK_GROUP1; // Acknowledge interrupt to PIE
        //GpioG1DataRegs.GPBSET.bit.GPIO32  = 0;
        return;
    }
    ------------------------------------------------------------------------------------------------------


    - Maxim

  • Maxim,

    I'll try this out on a clean setup.

    -Tommy
  • Maxim,

    Sorry for the delay.  I had to take care of some unexpected matters outside of work.

    I put together a bench setup with a function generator, THS4031 op-amp buffer, and a controlCARD.

    Starting from a fresh copy of epwm_adc_soc running out of RAM, I increased the Voltage[] arrays to 1024 and used your repeat-code detection approach to look for issues.  I did not see anything out of the ordinary.  There were some rare repeats (typically 1/1024 or less), but they coincided with signal peaks and troughs where repeats are most likely to occur.

    I am attaching the conversion results for Voltage2[] from sampling 250Hz triangle, sine, and ramp waveforms.

    250Hz_tri.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    1651 9 a040 1 400 a
    3128
    3358
    3577
    3362
    3139
    2912
    2688
    2463
    2238
    2016
    1790
    1567
    1342
    1116
    889
    663
    729
    956
    1180
    1407
    1632
    1856
    2081
    2306
    2532
    2759
    2987
    3210
    3434
    3508
    3284
    3056
    2831
    2610
    2383
    2159
    1934
    1708
    1482
    1257
    1029
    807
    590
    813
    1038
    1263
    1489
    1715
    1938
    2164
    2388
    2611
    2839
    3063
    3291
    3516
    3431
    3205
    2979
    2753
    2527
    2304
    2077
    1849
    1625
    1397
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    250Hz_sin.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    1651 9 a040 1 400 a
    932
    1190
    1493
    1835
    2181
    2529
    2848
    3129
    3346
    3497
    3572
    3560
    3473
    3305
    3073
    2786
    2454
    2106
    1757
    1427
    1131
    886
    710
    610
    592
    654
    800
    1016
    1295
    1612
    1956
    2309
    2650
    2954
    3219
    3414
    3537
    3583
    3542
    3427
    3232
    2974
    2665
    2330
    1978
    1637
    1315
    1040
    822
    668
    599
    610
    703
    877
    1111
    1406
    1734
    2083
    2434
    2771
    3058
    3299
    3475
    3567
    3583
    3514
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    250Hz_saw.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    1651 9 a040 1 400 a
    1102
    1209
    1325
    1439
    1549
    1663
    1775
    1887
    2001
    2112
    2224
    2340
    2451
    2563
    2679
    2790
    2904
    3017
    3131
    3246
    3359
    3468
    3584
    687
    800
    915
    1026
    1140
    1255
    1366
    1480
    1593
    1703
    1817
    1929
    2039
    2156
    2268
    2378
    2491
    2601
    2718
    2830
    2941
    3056
    3165
    3280
    3394
    3504
    615
    731
    841
    953
    1068
    1178
    1294
    1406
    1518
    1633
    1746
    1860
    1969
    2081
    2196
    2306
    2419
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    -Tommy

  • Maxim,

    Are you able to take some ADC conversions using a high bandwidth op-amp buffer?

    -Tommy
  • Tommy,

    We will prepare it and take the measurements. I'll inform you About the results

    - Maxim

  • Maxim,

    Is this still an open issue?

    -Tommy
  • Maxim,

    It has been a while since your last update. I assume that you were able to resolve your issue. If this isn’t the case, please reject this resolution and reply to this thread. If this thread is locked, please make a new thread describing the current status of your issue.

    -Tommy
  • Tommy,

    this issue is on our "to do list" with relatively high priority. Unfortanetly there are some issues at the end of the year, that have currently higher prio. The issue you're mentioning comes after that. The hardware , you've suggested is prepared. I'll inform you after the tests, I suppose next week

    - Maxim
  • please, close this issue for the moment.