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.

TMS320F28379D: ADC measurement changes when connecting two channels

Part Number: TMS320F28379D
Other Parts Discussed in Thread: LAUNCHXL-F28379D

I have a signal on ADCINB5 that I want to use with the CMPSS.  Since ADCINB5 does not share a pin with a CMPSS input, I connected ADCINB5 to ADCINA2, using the header pins on the LaunchPad.  (J7-5 to J3-9)

What I have observed:

Under the no-load condition and with ADCINB5 disconnected from ADCINA2, I see an ADC measurement of 0x8CC.

When I connect ADCINB5 to ADCINA2, the ADCINB5 measurement jumps to ~0x8DB.  The measurement at ADCINA2 is at ~0x88B.

  • I did not expect the ADCINB5 measurement to change
  • I expected that ADCINB5 would have the same measurement as ADCINA2

Launchpad revision is 2.0.  (The note for Rev 1.1 about ADCINA2 being tied to VREFHI on Rev 1.1 should not apply)

ADCINA2 is not connected in this application.  (The Launchpad is connected to a custom daughterboard, but ADCINA2 is not used)

I use SOC1 on ADCA for ADCINA2 and SOC1 on ADCB for ADCINB5.

SOC1 in both cases is triggered by EPWM6A


Any suggestions on why B5 does not match A2?  Or why B5 changes when A2 is connected?

Thanks!

  • Mark,

    Can you comment on the input circuit that is connected to the C2000 ADCINB5/A2?  It will help to get the full picture of what the source impedance are, etc.  I'll assume the signal mentioned above is DC in nature, but let me know if otherwise.

    1)Error when connecting to A2: 

    • Is the sampling order of B5 preserved when you connect/sample ADCINA2?  i.e. sample B5 then A2. 
    • If you sample B5 repeatedly(maybe like 8 times in a row) does it converge back to the original value you were measuring before shorting the pins?  Perhaps try this with the original config to verify the range of values you see for the baseline
    • Can you try the same experiment(with pins connected), but not enabling the CMPSS connected to A2, and see if B5 is still impacted? Sample A2 as well to see if that value changes

    2)Error from ADCA to ADCB

    • The magnitude of the delta here, 80 ADC codes, is out of spec for any ADC to ADC error  we list in the DS(+/-9LSBs total).  There is a pin capacitance difference between the two pins you are using, enabling the CMPSS adds a few more pF to ADCA as well(below).  I'm not sure this would explain the delta though; even w/o knowing the input circuit you have.  We can try the same oversample from above with A2 as with B5 to see if there is some drive effect that is not being accounted for.

    Best,
    Matthew

  • Hi Matthew,

    Per your first question,

    • I attempt to have them sampled at the same time.  Both triggered by EPWM6A.  Both with SOC1.  No conversions on either channel with SOC0.   SOC2 is used on both channels, but also triggered by EPWM6A.   The only differences: I use a PPB for ADCINB5/SOC1, and I have configured CMPSS1 for ADCINA2/SOC1.
    • I watch the ADCRESULT1 register in the Expressions window.  It bounces around +/- 3 ADC counts generally.  I'm watching it right now as I type, and it's generally between 0x8C5 and 0x8C9 with ADCINA2 connected and 0x8CC to 0x8CE without ADCINA2 connected
    • With ADCINA2 disconnected, I see 0x0000 in the ADCRESULT1 reg for ADCA/SOC1
    • With CMPSS uninitialized, and ADCINA2 connected to ADCINB5, I still see differences.  For example, 0x08B3 on ADCINB5 and 0x089B on ADCINA2.   ADCINA2 bounces around a bit more it seems, at least in terms of a wider range.  0x088A up to 0x089C in the short time that I'm watching it.  ADCINB5 is in the range 0x08B7 to 0x8BC. 

    It's a current sense circuit.  I can send you snippets of the schematics by PM, if it helps.

    Thanks!

  • Mark,

    Thanks for the added detail, and thanks for the circuit images you sent via PM.

    I'd like to try 2 things separately

    1)With ADCINA2 not connected, sample ADCINB5 8 times back to back, keeping the ADC loaded.  To do this you will need to set up SOC0-7 to have the same settings, then you can use ADCSOCFRC1 and write 0xFF to trigger all of these so that the sequencer will take care of the sample and keep the ADC loaded.  Record those results

    2)Do the same thing with ADCINA2, if it is possible to not connect the analog source to ADCINB5 do that, but if not its OK, just don't use ADCB while ADCA2 is sampling the same signal.

    I want to see if the value we get with 1 ADC sample matches the value we get at sample 8 in the above to ensure that the network is charging the ADC sample cap correctly.

    3)Clarification: The original intent of connecting to ADCINA2 was to use the comparator feature not available on ADCINB5, and when you did this you noticed ADCINB5 conversion changed, and then you added ADCINA2 sample; or was ADCINA2 being sampled from the beginning.  I want to make sure just the comparator feature caused the issue and not the sampling.

    Best,

    Matthew

  • Hi Matthew,

    Here is the code added, FYI:

        ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER0, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN5, 15);
        ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER1, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN5, 15);
        ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER2, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN5, 15);
        ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER3, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN5, 15);
        ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER4, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN5, 15);
        ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER5, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN5, 15);
        ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER6, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN5, 15);
        ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER7, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN5, 15);
    
    
        ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER0, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN2, 15);
        ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER1, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN2, 15);
        ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER2, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN2, 15);
        ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER3, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN2, 15);
        ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER4, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN2, 15);
        ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER5, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN2, 15);
        ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER6, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN2, 15);
        ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER7, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN2, 15);
    
    
        while(1){
    
            ADC_forceMultipleSOC(ADCB_BASE,ADC_FORCE_SOC0 |
                                 ADC_FORCE_SOC1 |
                                 ADC_FORCE_SOC2 |
                                 ADC_FORCE_SOC3 |
                                 ADC_FORCE_SOC4 |
                                 ADC_FORCE_SOC5 |
                                 ADC_FORCE_SOC6 |
                                 ADC_FORCE_SOC7);
    
            while(ADC_isBusy(ADCB_BASE))
                ;
    
            ADC_forceMultipleSOC(ADCA_BASE,ADC_FORCE_SOC0 |
                                 ADC_FORCE_SOC1 |
                                 ADC_FORCE_SOC2 |
                                 ADC_FORCE_SOC3 |
                                 ADC_FORCE_SOC4 |
                                 ADC_FORCE_SOC5 |
                                 ADC_FORCE_SOC6 |
                                 ADC_FORCE_SOC7);
    
            while(ADC_isBusy(ADCA_BASE))
                ;
    
    
        }

    ADCINB5 and ADCINA2 are disconnected.  The signal to be measured is connected to ADCINB5.

    1) Here is the result for ADCBIN5, from power-on reset and first attempt to capture:

    2) ADCINA2 results seem to change.  First sample is usually some non-zero, and then it converges to zero.  But not it seem to be different from run to run.  A few examples:

    3) Your understanding of the original intent is correct.  I only added ADCINA2 to use the comparator feature.  I added sampling of the ADC in addition to the comparator feature to verify the pin is seeing the same value as ADCINB5.

    To reconfirm, the schematic of the Launchpad custom daughterboard shows ADCINA2 not connected to anything.  So it is floating when not connected to ADCINB5.

  • Mark,
    Thanks for colleting this data for me.  For B5, it looks like the circuit is well driven and the sample and hold time is good for that connection, i.e. we don't see the subsequent results moving around a whole lot.

    For A2, this is interesting, as I wouldn't expect this to converge to zero(ground) if it was floating.  The S/H cap local will just stay charged to around either 1/2 or 1/4(I can't recall exactly offhand) of VREFHI.  Normally we wouldn't care about a float result, but in this case since it seems to effect B5 when connected this is why I wanted to see this data.

    More questions:

    Q1)In the above was the comparator that is connected to ADCINA2 enabled?  If so, can you turn it off and then take the samples again?

    Q2)Let's repeat the A2 sampling, but this time connect the voltage as you did in the beginning that is parallelly connected to B5.  Let's do this with the comparator enabled/disabled.

    Q3)Can you comment on the connections for the other ADCINA channels on your board?

    Q4)Also comment on connection to VREFHIs/VREFLOs(A/B/C/D) on the board as well

    Best,

    Matthew

  • Q1) I disabled CMPSS initialization, so it should be at whatever default settings, which I think is disabled.

    Q2) 

    With CMPSS initialization disabled, A2/B5 connected:

    With CMPSS initialization enabled, A2/B5 connected:

    Q3) I'll have to look more at the schematics for more detail, but at a higher-level:

    ADCINA0: Temp detection, but not configured in this test case

    ADCINA1: Temp detection, but not configured in this test case

    ADCINA2: Not used / Floating

    ADCINA3: Not used / Floating

    ADCINA4: Voltage detection, but not configured in this test case

    ADCINA5: Current detection, but not configured in this test case

    Q4) I confirmed that the LaunchPad has 5V on the header pins marked as 5V, and 3.3V on the pins marked as 3.3V.  I do not see a place to probe these signals directly on the LaunchPad

  • Mark,

    Thanks for the data and thanks for reminding me that we are on the LaunchPad.  The ADC reference generation is from a single REF5030 on the board(U13).  There are 2 amplifiers U19/U11 that are routed to ADCA/C and ADCB/D respectively.

    If you could probe R11(REFHIA) and R52(REFHIB) to make sure they look the same that would put that question to bed.  I want to make sure we don't have a board level issue that is giving a different VREFHI to the ADCs.

    The interesting thing about the new data is that ADCINA2 is unaffected by turning on the comparator, but ADCINB5 is effected(in addition to being offset in general from ADCAINA2 reading).

    Can you also verify and let me know the revision of the LAUNCHXL-F28379D you have?  This should be on the front side of the board below the rocket symbol on the silk screen(bottom left).

    Matt

  • Hi Matt,

    R52 is on the bottom side of the board, and I can't (easily) probe with the custom daughterboard attached (and the daughterboard provides power).

    Removing the daughterboard and powering by USB, I measure 3.0V on both R11 and R52.

    Board Rev is 2.0.

    Thanks,

    Mark

  • Hello Mark,

    Matt is out-of-office until January 8th, please allow until then for a follow-up response.

  • Hello Mark,

    To rule out the effect of ADCs settings, can you try this code to see what value you get in A2 and B5, if you run two ADC A and B in parallel?

    You can use the following code in your project. The variables adcAResults and adcBResults should be very close to each other (4~5 LSB differences)

    //#############################################################################
    //
    // FILE:   adc_ex2_soc_epwm.c
    //
    // TITLE:  ADC ePWM Triggering
    //
    //! \addtogroup driver_example_list
    //! <h1>ADC ePWM Triggering</h1>
    //!
    //! This example sets up ePWM1 to periodically trigger a conversion on ADCA.
    //!
    //! \b External \b Connections \n
    //!  - A2 and B5 should be connected to a signal to convert
    //!
    //! \b Watch \b Variables \n
    //! - \b adcAResults and  adcBResults- A sequence of analog-to-digital conversion samples from
    //!   pin A2 and B5. The time between samples is determined based on the period
    //!   of the ePWM timer.
    //!
    //
    //#############################################################################
    //
    // 
    // $Copyright:
    // Copyright (C) 2013-2023 Texas Instruments Incorporated - http://www.ti.com/
    //
    // Redistribution and use in source and binary forms, with or without 
    // modification, are permitted provided that the following conditions 
    // are met:
    // 
    //   Redistributions of source code must retain the above copyright 
    //   notice, this list of conditions and the following disclaimer.
    // 
    //   Redistributions in binary form must reproduce the above copyright
    //   notice, this list of conditions and the following disclaimer in the 
    //   documentation and/or other materials provided with the   
    //   distribution.
    // 
    //   Neither the name of Texas Instruments Incorporated nor the names of
    //   its contributors may be used to endorse or promote products derived
    //   from this software without specific prior written permission.
    // 
    // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
    // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
    // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
    // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
    // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    // $
    //#############################################################################
    //
    
    //
    // Included Files
    //
    #include "driverlib.h"
    #include "device.h"
    
    //
    // Defines
    //
    #define RESULTS_BUFFER_SIZE     256
    #define EX_ADC_RESOLUTION       12
    // 12 for 12-bit conversion resolution, which supports (ADC_MODE_SINGLE_ENDED)
    // Sample on single pin (VREFLO is the low reference)
    // Or 16 for 16-bit conversion resolution, which supports (ADC_MODE_DIFFERENTIAL)
    // Sample on pair of pins (difference between pins is converted, subject to
    // common mode voltage requirements; see the device data manual)
    
    //
    // Globals
    //
    uint16_t adcAResults[RESULTS_BUFFER_SIZE];   // Buffer for results
    uint16_t adcBResults[RESULTS_BUFFER_SIZE];
    uint16_t index;                              // Index into result buffer
    volatile uint16_t bufferFull;                // Flag to indicate buffer is full
    
    //
    // Function Prototypes
    //
    void initADC(void);
    void initEPWM(void);
    void initADCSOC(void);
    __interrupt void adcA1ISR(void);
    __interrupt void adcB1ISR(void);
    
    //
    // Main
    //
    void main(void)
    {
        //
        // Initialize device clock and peripherals
        //
        Device_init();
    
        //
        // Disable pin locks and enable internal pullups.
        //
        Device_initGPIO();
    
        //
        // Initialize PIE and clear PIE registers. Disables CPU interrupts.
        //
        Interrupt_initModule();
    
        //
        // Initialize the PIE vector table with pointers to the shell Interrupt
        // Service Routines (ISR).
        //
        Interrupt_initVectorTable();
    
        //
        // Interrupts that are used in this example are re-mapped to ISR functions
        // found within this file.
        //
        Interrupt_register(INT_ADCA1, &adcA1ISR);
        Interrupt_register(INT_ADCB1, &adcB1ISR);
    
        //
        // Set up the ADC and the ePWM and initialize the SOC
        //
        initADC();
        initEPWM();
        initADCSOC();
    
        //
        // Initialize results buffer
        //
        for(index = 0; index < RESULTS_BUFFER_SIZE; index++)
        {
            adcAResults[index] = 0;
            adcBResults[index] = 0;
        }
    
        index = 0;
        bufferFull = 0;
    
        //
        // Enable ADC interrupt
        //
        Interrupt_enable(INT_ADCA1);
        Interrupt_enable(INT_ADCB1);
    
        //
        // Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
        //
        EINT;
        ERTM;
    
        //
        // Loop indefinitely
        //
        while(1)
        {
            //
            // Start ePWM1, enabling SOCA and putting the counter in up-count mode
            //
            EPWM_enableADCTrigger(EPWM1_BASE, EPWM_SOC_A);
            EPWM_setTimeBaseCounterMode(EPWM1_BASE, EPWM_COUNTER_MODE_UP);
    
            //
            // Wait while ePWM1 causes ADC conversions which then cause interrupts.
            // When the results buffer is filled, the bufferFull flag will be set.
            //
            while(bufferFull == 0)
            {
            }
            bufferFull = 0;     // Clear the buffer full flag
    
            //
            // Stop ePWM1, disabling SOCA and freezing the counter
            //
            EPWM_disableADCTrigger(EPWM1_BASE, EPWM_SOC_A);
            EPWM_setTimeBaseCounterMode(EPWM1_BASE, EPWM_COUNTER_MODE_STOP_FREEZE);
    
            //
            // Software breakpoint. At this point, conversion results are stored in
            // adcAResults.
            //
            // Hit run again to get updated conversions.
            //
            //ESTOP0;
        }
    }
    
    //
    // Function to configure and power up ADCA.
    //
    void initADC(void)
    {
        
        //
        // Set ADCDLK divider to /4
        //
        ADC_setPrescaler(ADCA_BASE, ADC_CLK_DIV_4_0);
        ADC_setPrescaler(ADCB_BASE, ADC_CLK_DIV_4_0);
    
        //
        // Set resolution and signal mode (see #defines above) and load
        // corresponding trims.
        //
    #if(EX_ADC_RESOLUTION == 12)
        ADC_setMode(ADCA_BASE, ADC_RESOLUTION_12BIT, ADC_MODE_SINGLE_ENDED);
        ADC_setMode(ADCB_BASE, ADC_RESOLUTION_12BIT, ADC_MODE_SINGLE_ENDED);
    #elif(EX_ADC_RESOLUTION == 16)
        ADC_setMode(ADCA_BASE, ADC_RESOLUTION_16BIT, ADC_MODE_DIFFERENTIAL);
    #endif
    
        //
        // Set pulse positions to late
        //
        ADC_setInterruptPulseMode(ADCA_BASE, ADC_PULSE_END_OF_CONV);
        ADC_setInterruptPulseMode(ADCB_BASE, ADC_PULSE_END_OF_CONV);
    
        //
        // Power up the ADC and then delay for 1 ms
        //
        ADC_enableConverter(ADCA_BASE);
        ADC_enableConverter(ADCB_BASE);
        DEVICE_DELAY_US(1000);
    }
    
    //
    // Function to configure ePWM1 to generate the SOC.
    //
    void initEPWM(void)
    {
        //
        // Disable SOCA
        //
        EPWM_disableADCTrigger(EPWM1_BASE, EPWM_SOC_A);
    
        //
        // Configure the SOC to occur on the first up-count event
        //
        EPWM_setADCTriggerSource(EPWM1_BASE, EPWM_SOC_A, EPWM_SOC_TBCTR_U_CMPA);
        EPWM_setADCTriggerEventPrescale(EPWM1_BASE, EPWM_SOC_A, 1);
    
        //
        // Set the compare A value to 1000 and the period to 1999
        // Assuming ePWM clock is 100MHz, this would give 50kHz sampling
        // 50MHz ePWM clock would give 25kHz sampling, etc. 
        // The sample rate can also be modulated by changing the ePWM period
        // directly (ensure that the compare A value is less than the period). 
        //
        EPWM_setCounterCompareValue(EPWM1_BASE, EPWM_COUNTER_COMPARE_A, 1000);
        EPWM_setTimeBasePeriod(EPWM1_BASE, 1999);
    
        //
        // Set the local ePWM module clock divider to /1
        //
        EPWM_setClockPrescaler(EPWM1_BASE,
                               EPWM_CLOCK_DIVIDER_1,
                               EPWM_HSCLOCK_DIVIDER_1);
    
        //
        // Freeze the counter
        //
        EPWM_setTimeBaseCounterMode(EPWM1_BASE, EPWM_COUNTER_MODE_STOP_FREEZE);
    }
    
    //
    // Function to configure ADCA's SOC0 to be triggered by ePWM1.
    //
    void initADCSOC(void)
    {
        //
        // Configure SOC0 of ADCA to convert pin A0. The EPWM1SOCA signal will be
        // the trigger.
        // - For 12-bit resolution, a sampling window of 15 (75 ns at a 200MHz
        //   SYSCLK rate) will be used.  For 16-bit resolution, a sampling window
        //   of 64 (320 ns at a 200MHz SYSCLK rate) will be used.
        // - NOTE: A longer sampling window will be required if the ADC driving
        //   source is less than ideal (an ideal source would be a high bandwidth
        //   op-amp with a small series resistance). See TI application report
        //   SPRACT6 for guidance on ADC driver design.
        //
    
    #if(EX_ADC_RESOLUTION == 12)
        ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER0, ADC_TRIGGER_EPWM1_SOCA,
                     ADC_CH_ADCIN2, 15);
        ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER0, ADC_TRIGGER_EPWM1_SOCA,
                         ADC_CH_ADCIN5, 15);
    #elif(EX_ADC_RESOLUTION == 16)
        ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER0, ADC_TRIGGER_EPWM1_SOCA,
                     ADC_CH_ADCIN0, 64);
    #endif
    
        //
        // Set SOC0 to set the interrupt 1 flag. Enable the interrupt and make
        // sure its flag is cleared.
        //
        ADC_setInterruptSource(ADCA_BASE, ADC_INT_NUMBER1, ADC_SOC_NUMBER0);
        ADC_setInterruptSource(ADCB_BASE, ADC_INT_NUMBER1, ADC_SOC_NUMBER0);
        ADC_enableInterrupt(ADCA_BASE, ADC_INT_NUMBER1);
        ADC_enableInterrupt(ADCB_BASE, ADC_INT_NUMBER1);
        ADC_clearInterruptStatus(ADCA_BASE, ADC_INT_NUMBER1);
        ADC_clearInterruptStatus(ADCB_BASE, ADC_INT_NUMBER1);
    }
    
    //
    // ADC A Interrupt 1 ISR
    //
    __interrupt void adcA1ISR(void)
    {
        //
        // Add the latest result to the buffer
        //
        adcAResults[index++] = ADC_readResult(ADCARESULT_BASE, ADC_SOC_NUMBER0);
        //
        // Set the bufferFull flag if the buffer is full
        //
        if(RESULTS_BUFFER_SIZE <= index)
        {
            index = 0;
            bufferFull = 1;
        }
    
        //
        // Clear the interrupt flag
        //
        ADC_clearInterruptStatus(ADCA_BASE, ADC_INT_NUMBER1);
        //
        // Check if overflow has occurred
        //
        if(true == ADC_getInterruptOverflowStatus(ADCA_BASE, ADC_INT_NUMBER1))
        {
            ADC_clearInterruptOverflowStatus(ADCA_BASE, ADC_INT_NUMBER1);
            ADC_clearInterruptStatus(ADCA_BASE, ADC_INT_NUMBER1);
        }
    
    
        //
        // Acknowledge the interrupt
        //
        Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
    }
    //
    // ADC B Interrupt 1 ISR
    //
    __interrupt void adcB1ISR(void)
    {
        //
        // Add the latest result to the buffer
        //
    
        adcBResults[index++] = ADC_readResult(ADCBRESULT_BASE, ADC_SOC_NUMBER0);
        //
        // Set the bufferFull flag if the buffer is full
        //
        if(RESULTS_BUFFER_SIZE <= index)
        {
            index = 0;
            bufferFull = 1;
        }
    
        //
        // Clear the interrupt flag
        //
    
        ADC_clearInterruptStatus(ADCB_BASE, ADC_INT_NUMBER1);
        //
        // Check if overflow has occurred
    
        if(true == ADC_getInterruptOverflowStatus(ADCB_BASE, ADC_INT_NUMBER1))
        {
            ADC_clearInterruptOverflowStatus(ADCB_BASE, ADC_INT_NUMBER1);
            ADC_clearInterruptStatus(ADCB_BASE, ADC_INT_NUMBER1);
        }
    
        //
        // Acknowledge the interrupt
        //
        Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
    }
    
    

    Regards,

    Hadi