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.

MSP432P401R: Performance issue

Part Number: MSP432P401R
Other Parts Discussed in Thread: ADS131A02

Hi,

i am using the MSP432 to get 48kHz samples from the ADS131A02.

The problem is that the MSP432 is losing some interrupts and not reacting fast enought.

This is what i want to do: Get 48kHz samples via SPI and send it via UART to PC (FDTI chip)

So the problem is that the MSP432 is too slow to receive and send the samples:

Here is my code:

/*
 * main.c
 */
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include <ti/devices/msp432p4xx/driverlib/driverlib.h>
#include <ti/devices/msp432p4xx/inc/msp.h>
#include "ADS131A02.h"
#include "UART.h"
#define RX_TASKS    9
#define TX_TASKS    7

Timer_A_PWMConfig pwmConfig =
{
        TIMER_A_CLOCKSOURCE_SMCLK,
        TIMER_A_CLOCKSOURCE_DIVIDER_1,//8MHz= TIMER_A_CLOCKSOURCE_DIVIDER_3 4MHz=TIMER_A_CLOCKSOURCE_DIVIDER_6 2MHz=TIMER_A_CLOCKSOURCE_DIVIDER_12
        2,
        TIMER_A_CAPTURECOMPARE_REGISTER_1,
        TIMER_A_OUTPUTMODE_TOGGLE_SET,
        1
};
Timer_A_PWMConfig pwmConfig1 =
{
        TIMER_A_CLOCKSOURCE_SMCLK,
        TIMER_A_CLOCKSOURCE_DIVIDER_1,//8MHz= TIMER_A_CLOCKSOURCE_DIVIDER_3 4MHz=TIMER_A_CLOCKSOURCE_DIVIDER_6 2MHz=TIMER_A_CLOCKSOURCE_DIVIDER_12
        1,
        TIMER_A_CAPTURECOMPARE_REGISTER_1,
        TIMER_A_OUTPUTMODE_TOGGLE_RESET,//TIMER_A_OUTPUTMODE_TOGGLE,
        1
};


void main(void)
{
    /* Halt watchdog timer */
    MAP_WDT_A_holdTimer();

    GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_PJ, GPIO_PIN2 | GPIO_PIN3, GPIO_PRIMARY_MODULE_FUNCTION);
    CS_setExternalClockSourceFrequency(32768,48000000);
    PCM_setCoreVoltageLevel(PCM_VCORE1);
    FlashCtl_setWaitState(FLASH_BANK0, 2);
    FlashCtl_setWaitState(FLASH_BANK1, 2);
    CS_startHFXT(false);

    CS_initClockSignal(CS_MCLK , CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
    CS_initClockSignal(CS_SMCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);// MHz

    /* Configuring GPIO2.4 as peripheral output for PWM  */
    MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN4,GPIO_PRIMARY_MODULE_FUNCTION);
    MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P5, GPIO_PIN6,GPIO_PRIMARY_MODULE_FUNCTION);

    /* Configuring Timer_A */
    MAP_Timer_A_generatePWM(TIMER_A0_BASE, &pwmConfig);
    MAP_Timer_A_generatePWM(TIMER_A2_BASE, &pwmConfig1);
    /*Power Up Board*/
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P2, GPIO_PIN7);
    MAP_GPIO_setOutputHighOnPin(GPIO_PORT_P2, GPIO_PIN7);

    ADS131A02_SPI_Setup();
    ADS131A02_START();
    UART_init_Communication();

    while(1)
    {
        MAP_PCM_gotoLPM0();
    }
}

/*
 * ADS131A02.c
 */
#include "ADS131A02.h"
#include "UART.h"
#include <ti/devices/msp432p4xx/driverlib/driverlib.h>
#include <stdio.h>
#include <string.h>


/* DMA Control Table */
/* DMA Control Table */

#pragma DATA_ALIGN(controlTable, 256)
uint8_t controlTable[256];

uint8_t DMA_recBuffer[9];
uint8_t DMA_sendBuffer[9];
int count_value=0;
uint8_t data_array[9]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
int adc_value=0;
int adc_value1=0;

#define DMATX   DMA_CH2_EUSCIB1TX0
#define DMARX   DMA_CH3_EUSCIB1RX0
#define DMATX_Channel   2
#define DMARX_Channel   3


void ADS131A02_SPI_Setup(void)
{
    switch_data=0;


    GPIO_setAsOutputPin(GPIO_PORT_P3, GPIO_PIN0);
    GPIO_setAsOutputPin(GPIO_PORT_P3, GPIO_PIN6);

    GPIO_setAsInputPin(GPIO_PORT_P3, GPIO_PIN2);

    GPIO_setOutputHighOnPin(GPIO_PORT_P3, GPIO_PIN0);       // CS Disable
    GPIO_setOutputLowOnPin(GPIO_PORT_P3, GPIO_PIN6);       // Reset Enable

    // SPI Master Configuration Parameter
    const eUSCI_SPI_MasterConfig spiMasterConfig =
    {
            EUSCI_A_SPI_CLOCKSOURCE_SMCLK,                              // SMCLK Clock Source
            48000000,                                                   // SMCLK = HFXT = 48Mhz
            24000000,                                                   // SPICLK =12000000
            EUSCI_A_SPI_MSB_FIRST,                                      // MSB First
            EUSCI_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT,      // Phase EUSCI_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT / EUSCI_SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT
            EUSCI_A_SPI_CLOCKPOLARITY_INACTIVITY_LOW,                   // High polarity
            EUSCI_A_SPI_3PIN

    };


    GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6, GPIO_PIN3 | GPIO_PIN4  | GPIO_PIN5 , GPIO_PRIMARY_MODULE_FUNCTION);

    /* Configuring SPI in 4wire master mode */
    SPI_initMaster(EUSCI_B1_BASE, &spiMasterConfig);
    SPI_enableModule(EUSCI_B1_BASE);

    /* Enable Interrupt */
    GPIO_clearInterruptFlag(GPIO_PORT_P3, GPIO_PIN2);
    GPIO_enableInterrupt(GPIO_PORT_P3, GPIO_PIN2);
    GPIO_interruptEdgeSelect(GPIO_PORT_P3, GPIO_PIN2,GPIO_HIGH_TO_LOW_TRANSITION);//


    SPI_clearInterruptFlag(EUSCI_B1_BASE, EUSCI_B_SPI_TRANSMIT_INTERRUPT);
}
void ADS131A02_CS_Disable(void)
{
    GPIO_setOutputHighOnPin(GPIO_PORT_P3, GPIO_PIN0);       // CS Disable
}
void ADS131A02_CS_Enable(void)
{
    GPIO_setOutputLowOnPin(GPIO_PORT_P3, GPIO_PIN0);       // CS Enable
}

void write_Command(uint16_t ADSregister)
{
    uint8_t valueMSB=(ADSregister>>8)&0xFF;
    uint8_t valueLSB=(ADSregister)&0xFF;
    ADS131A02_CS_Enable();
    __delay_cycles(10);
    EUSCI_A_SPI_transmitData(EUSCI_B1_BASE,valueMSB);
    EUSCI_A_SPI_transmitData(EUSCI_B1_BASE, valueLSB);
   // EUSCI_A_SPI_transmitData(EUSCI_B1_BASE, 0x00);

    ADS131A02_CS_Disable();
}
void write_register(uint8_t ADSregister,uint8_t ADSregisterValue)
{
    ADS131A02_CS_Enable();
    __delay_cycles(10);

    EUSCI_A_SPI_transmitData(EUSCI_B1_BASE, (0x40 | ADSregister));
    EUSCI_A_SPI_transmitData(EUSCI_B1_BASE, ADSregisterValue);
   // EUSCI_A_SPI_transmitData(EUSCI_B1_BASE, 0x00);

    ADS131A02_CS_Disable();
}
uint16_t read_register(uint8_t ADSregister)
{
    uint16_t ret=0;
    ADS131A02_CS_Enable();
    EUSCI_A_SPI_transmitData(EUSCI_B1_BASE, (0x20 | ADSregister));
    ret=EUSCI_A_SPI_receiveData(EUSCI_B1_BASE);
    EUSCI_A_SPI_transmitData(EUSCI_B1_BASE, 0x00);
    ret=ret<<8;
    ret=ret | EUSCI_A_SPI_receiveData(EUSCI_B1_BASE);
    //EUSCI_A_SPI_transmitData(EUSCI_B1_BASE, 0x00);

    ADS131A02_CS_Disable();
    return ret;
}
void ADS131A02_START(void)
{
    GPIO_setOutputLowOnPin(GPIO_PORT_P3, GPIO_PIN6);       // Reset
    __delay_cycles(240000);
    GPIO_setOutputHighOnPin(GPIO_PORT_P3, GPIO_PIN6);       // Reset Disable
    __delay_cycles(240000);
    __delay_cycles(240000);
    while(1)//(GPIO_getInputPinValue(GPIO_PORT_P7, GPIO_PIN0)!=0)
    {
        //wait until ready
        write_Command(0x0000);
        write_Command(UNLOCK);//UnLock Reg
        uint16_t myValue=read_register(REG_STAT_1);
        if(myValue!= 0xFF02)
            break;
    }

    write_register(REG_CLK1,REG_CLK1_VALUE);//Set CLK1
    write_register(REG_CLK2,REG_CLK2_VALUE);//Set CLK2
    write_register(REG_A_SYS_CFG,REG_A_SYS_CFG_VALUE);//Set CLK2
    write_register(REG_ADC1,REG_ADC1_VALUE);//GAIN ADC
    write_register(REG_ADC2,REG_ADC2_VALUE);//GAIN ADC
    write_register(REG_ADC_ENA,REG_ADC_ENA_VALUE);//Enbale ADC
    //uint8_t myValue=read_register(REG_STAT_1);
    write_Command(WAKEUP);//Wake ADC
    write_Command(LOCK);//Lock Reg

    ADS131A02_DMASetup();
}
void ADS131A02_DATA(void)
{
    //READ Values
}

void ADS131A02_DMASetup(void)
{
    //Assigning DMA to SPI Channels
    DMA_enableModule();
    DMA_setControlBase(controlTable);

    DMA_assignChannel(DMATX);
    DMA_assignChannel(DMARX);

    // Disabling channel attributes
    DMA_disableChannelAttribute(DMATX,UDMA_ATTR_ALTSELECT | UDMA_ATTR_USEBURST |UDMA_ATTR_HIGH_PRIORITY |UDMA_ATTR_REQMASK);
    DMA_disableChannelAttribute(DMARX,UDMA_ATTR_ALTSELECT | UDMA_ATTR_USEBURST |UDMA_ATTR_HIGH_PRIORITY |UDMA_ATTR_REQMASK);

    // Setup the TX transfer characteristics & buffers
    DMA_setChannelControl (DMATX | UDMA_PRI_SELECT,UDMA_SIZE_8 | UDMA_SRC_INC_NONE | UDMA_DST_INC_NONE | UDMA_ARB_1);
    DMA_setChannelTransfer(DMATX | UDMA_PRI_SELECT,UDMA_MODE_BASIC, data_array,(void *) MAP_SPI_getTransmitBufferAddressForDMA(EUSCI_B1_BASE),6);

    DMA_setChannelControl (DMARX | UDMA_PRI_SELECT,UDMA_SIZE_8 | UDMA_SRC_INC_NONE | UDMA_DST_INC_8 | UDMA_ARB_1);
    DMA_setChannelTransfer(DMARX | UDMA_PRI_SELECT,UDMA_MODE_BASIC,(void *) MAP_SPI_getReceiveBufferAddressForDMA(EUSCI_B1_BASE),data_array1,SIZE_BUFF_TX);

    DMA_enableChannel(DMARX_Channel);

    DMA_assignInterrupt(DMA_INT1, DMATX_Channel);
    DMA_clearInterruptFlag(INT_DMA_INT1);
    Interrupt_enableInterrupt(DMA_INT1);

    DMA_assignInterrupt(DMA_INT2, DMARX_Channel);
    DMA_clearInterruptFlag(INT_DMA_INT2);
    Interrupt_enableInterrupt(DMA_INT2);

    Interrupt_enableInterrupt(INT_PORT3);
    Interrupt_enableMaster();
}

void DMA_INT2_IRQHandler(void)
{
    ADS131A02_CS_Disable();
    DMA_clearInterruptFlag(INT_DMA_INT2);

    DMA_setChannelControl (DMARX | UDMA_PRI_SELECT,UDMA_SIZE_8 | UDMA_SRC_INC_NONE | UDMA_DST_INC_8 | UDMA_ARB_1);
    DMA_setChannelTransfer(DMARX | UDMA_PRI_SELECT,UDMA_MODE_BASIC,(void *) SPI_getReceiveBufferAddressForDMA(EUSCI_B1_BASE),data_array1,SIZE_BUFF_TX);
    DMA_enableChannel(DMARX_Channel);

    if(Flag_UART==1)
    {
        memcpy(zUI8_BUFF_TX, data_array1, sizeof(data_array1[0])*SIZE_BUFF_TX);
        DMA_setChannelControl(UDMA_PRI_SELECT | DMA_CH0_EUSCIA0TX,UDMA_SIZE_8 | UDMA_SRC_INC_8 | UDMA_DST_INC_NONE | UDMA_ARB_1);
        DMA_setChannelTransfer(UDMA_PRI_SELECT | DMA_CH0_EUSCIA0TX, UDMA_MODE_BASIC, zUI8_BUFF_TX,(void*)UART_getTransmitBufferAddressForDMA(EUSCI_A0_BASE), SIZE_BUFF_TX);
        DMA_enableChannel(0);
    }

}
void DMA_INT1_IRQHandler(void)
{
    DMA_clearInterruptFlag(INT_DMA_INT1);
    ADS131A02_CS_Disable();

}
void PORT3_IRQHandler(void)
{
    uint_fast16_t status = GPIO_getEnabledInterruptStatus(GPIO_PORT_P3);
    GPIO_clearInterruptFlag(GPIO_PORT_P3, status);

     if(status & GPIO_PIN2)
     {
         GPIO_clearInterruptFlag(GPIO_PORT_P3, GPIO_PIN2);
         ADS131A02_CS_Enable();
         DMA_SPI_TX();
     }
}

void DMA_SPI_TX(void)
{
    // Setup the TX transfer characteristics & buffers
    DMA_setChannelControl (DMATX | UDMA_PRI_SELECT,UDMA_SIZE_8 | UDMA_SRC_INC_NONE | UDMA_DST_INC_NONE | UDMA_ARB_1);
    DMA_setChannelTransfer(DMATX | UDMA_PRI_SELECT,UDMA_MODE_BASIC, data_array,(void *) SPI_getTransmitBufferAddressForDMA(EUSCI_B1_BASE),6);
    DMA_enableChannel(DMATX_Channel);
}

/*
 * UART.c
 */
#include "UART.h"
#include <ti/devices/msp432p4xx/driverlib/driverlib.h>
#include <string.h>
#include <stdio.h>


extern char Receive_UART[100]={};
void UART_DMASetup(void);
void UART_Send_OUT(char* read_buf);
uint8_t BufferRead[2] ={};

#define zCHAN_DMA_UART_TX  DMA_CHANNEL_0

uint8_t wert_inc=0;
char UART_Wert;
//*****************************************************************************
// DMA Control Table
//*****************************************************************************
#ifdef ewarm
#pragma data_alignment=1024
#else
#pragma DATA_ALIGN(controlTable, 1024)
#endif
uint8_t controlTable[1024];


//*****************************************************************************
//
// 115200 Baudrate
//software-dl.ti.com/.../index.html
//*****************************************************************************
const eUSCI_UART_Config uartConfig =
{
     EUSCI_A_UART_CLOCKSOURCE_SMCLK,          // SMCLK Clock Source
     26,                                      // BRDIV = 26
     0,                                       // UCxBRF = 0
     111,                                      // UCxBRS = 111
     EUSCI_A_UART_NO_PARITY,                  // No Parity
     EUSCI_A_UART_LSB_FIRST,                  // LSB First
     EUSCI_A_UART_ONE_STOP_BIT,               // One stop bit
     EUSCI_A_UART_MODE,                       // UART mode
     EUSCI_A_UART_OVERSAMPLING_BAUDRATE_GENERATION  // Oversampling
};

//*****************************************************************************
//

//
//*****************************************************************************
void UART_init_Communication(void)
{

	    MAP_GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P1, GPIO_PIN1 | GPIO_PIN2 | GPIO_PIN3, GPIO_PRIMARY_MODULE_FUNCTION);

	    MAP_UART_initModule(EUSCI_A0_BASE, &uartConfig);

	    MAP_UART_enableModule(EUSCI_A0_BASE);

	    MAP_UART_enableInterrupt(EUSCI_A0_BASE, EUSCI_A_UART_RECEIVE_INTERRUPT);
	    MAP_Interrupt_enableInterrupt(INT_EUSCIA0);

	   // Interrupt_disableSleepOnIsrExit();

	    //char info[]= "UART";
	    //UART_Send_OUT(info);
	   // memset(zUI8_BUFF_TX,  0x00, SIZE_BUFF_TX);
	    UART_DMASetup();
}

//*****************************************************************************
//
void UART_DMASetup(void)
{

    //Assigning DMA to SPI Channels
    //MAP_DMA_enableModule();
    //MAP_DMA_setControlBase(controlTable);

    MAP_DMA_assignChannel(DMA_CH0_EUSCIA0TX);
    // Disabling channel attributes
    MAP_DMA_disableChannelAttribute(DMA_CH0_EUSCIA0TX,UDMA_ATTR_ALTSELECT | UDMA_ATTR_USEBURST |UDMA_ATTR_HIGH_PRIORITY |UDMA_ATTR_REQMASK);

    MAP_DMA_setChannelControl(UDMA_PRI_SELECT | DMA_CH0_EUSCIA0TX,UDMA_SIZE_8 | UDMA_SRC_INC_8 | UDMA_DST_INC_NONE | UDMA_ARB_1);

    MAP_DMA_setChannelTransfer(UDMA_PRI_SELECT | DMA_CH0_EUSCIA0TX, UDMA_MODE_BASIC, zUI8_BUFF_TX,(void*)MAP_UART_getTransmitBufferAddressForDMA(EUSCI_A0_BASE), SIZE_BUFF_TX);

}



/**********************************************************************************************************
* void UART_DMA(void)                                                                  *
**********************************************************************************************************/
void UART_DMA(void)
{
    MAP_DMA_setChannelControl(UDMA_PRI_SELECT | DMA_CH0_EUSCIA0TX,UDMA_SIZE_8 | UDMA_SRC_INC_8 | UDMA_DST_INC_NONE | UDMA_ARB_1);
    MAP_DMA_setChannelTransfer(UDMA_PRI_SELECT | DMA_CH0_EUSCIA0TX, UDMA_MODE_BASIC, zUI8_BUFF_TX,(void*)MAP_UART_getTransmitBufferAddressForDMA(EUSCI_A0_BASE), SIZE_BUFF_TX);
    MAP_DMA_enableChannel(0);
}

/**********************************************************************************************************
* void UART_Send_OUT(void)                                                                  *
**********************************************************************************************************/
void UART_Send_OUT(char* read_buf)
{
    int i;
    for(i=0; i < strlen(read_buf) ; i++)
    {
        while (!(EUSCI_A_IFG_TXIFG & EUSCI_A0->IFG));
        MAP_UART_transmitData(EUSCI_A0_BASE, read_buf[i]);
    }
}

void COM(void)
{
    if(strcmp(Receive_UART,"START") == 0)
    {
        Flag_UART=1;
    }
    else if(strcmp(Receive_UART,"STOP") == 0 || strcmp(Receive_UART,"STOPT") == 0)
    {
        Flag_UART=0;
    }
    memset(Receive_UART,  0x00, 100);
}


/*******************************************************************************
 * EUSCI_A0_INT_BASE ISR. .
 *******************************************************************************/
void EUSCIA0_IRQHandler(void)
{
    uint32_t status = MAP_UART_getEnabledInterruptStatus(EUSCI_A0_BASE);

    MAP_UART_clearInterruptFlag(EUSCI_A0_BASE, status);

    if(status & EUSCI_A_UART_RECEIVE_INTERRUPT)
    {
        UART_Wert = UART_receiveData(EUSCI_A0_BASE);

        if(UART_Wert == 10 || UART_Wert == 13 || UART_Wert == 58)
        {
            COM();
            wert_inc=0;
        }
        else
        {
            if(UART_Wert != 0)
            {
                Receive_UART[wert_inc] = UART_Wert;
                wert_inc++;
            }
        }

         MAP_Interrupt_disableSleepOnIsrExit();
    }
}

My question is how to increase performace on MSP432? Is it possible?

The problem is that the DMA TX always have to be reconfigured and Chip select must be enable/disable.

  • Hi,

    the MSP432 support team is currently out on 4th of July, but will respond back to you as soon as possible.
    Sorry for any inconvenience this may cause.

    Best regards,
    Andre
  • Yes, dealing with /CS and DMA is a bother. I don't know a real good way to make it go away (I've thought of a few, but they're all too hazardous to deploy), but I think you can shave things:
    -------------------
    I can't see all the constants here, but if this is like most SPI+DMA operations, the RX count is the same as the TX count. Thus you don't really need both INT1 and INT2. When Rx (INT2) triggers, the Tx side is guaranteed to be finished by the nature of SPI. Specifically: Get rid of DMA_INT1.

    Alternatively: A dance-on-one-toe approach: The Tx DMA will finish 2 byte-times before the Rx DMA. Use INT1 instead, do e.g. the UART DMA setup in the slack time, then spin on UCBUSY (almost certainly =0 by then).
    -------------------
    When DRDY triggers you re-init the TX DMA and start it. Move the re-init into the slack time in the (INT2) ISR, then use the pin ISR to just set the Enable bit. (Unsolicited: I don't think you need to clear the P3.2 IFG twice.)
    -------------------
    Similarly, for the UART DMA.
    -------------------
    Keep in the back of your mind: With a fast SPI and small+frequent transactions, at some point DMA interrupts become a net loss. I tried most of these tricks trying to drive an SPI DAC, and finally ended up just tossing the interrupts (though not the DMA). Consider a structure where the DRDY ISR does all the completion+reinit+CS (toggle twice)+restart and balance it against the cost of the interrupt bookkeeping.
  • Hi Bruce,

    DMA RX has like to wait 504 values to arrive to fire the DMA_INT2.
    DMA TX only sends 6 values to read from ADC and thats it.
    I will try your tips to improve the performance and will come back here.
    I hope that the MSP432 can handle reading 48KHz samples and sending it to UART. Otherwise i have to find another MCU that can handle it.
  • Ah OK, so that extra-long cycle is DMA_INT2 firing(?).

    Knowing that, the scope trace does a moderately good job of mapping the costs of each of the 3x ISRs. (DMA_setChannelTransfer seems to do an awful lot of work for what should be 3x 32-bit assignments -- only one of which you need.)

    If the Rx buffer is really that large, the memcpy() is probably hurting you. I suggest you double-buffer (data_array1[2][SIZE_BUFF_TX]) the SPI RX DMA -- you have to set that address in the descriptor anyway -- and do the UART DMA directly from the SPI Rx buffer.
  • Hi Bruce,

    first i change the RX DMA buffer to receive 6 bytes instead of 504 and uncomment the DMA_INT1 that had only disabled /CS.

    Even that UART wasnt enabled to send data, he was losing already INT values.

    Now i left the RX DMA to 504 and enable the DMA_INT1 to re-init DMA TX and disable /CS. I also set the data_array1 as double-buffer like you said and change the code a little bit to optimize the CPU performance:

    void DMA_INT2_IRQHandler(void)
    {
        ADS131A02_CS_Disable();
        DMA_clearInterruptFlag(INT_DMA_INT2);
    
        if(Flag_UART==1)
        {
            //memcpy(zUI8_BUFF_TX, data_array1, sizeof(data_array1[0])*SIZE_BUFF_TX);
            DMA_setChannelControl(UDMA_PRI_SELECT | DMA_CH0_EUSCIA0TX,UDMA_SIZE_8 | UDMA_SRC_INC_8 | UDMA_DST_INC_NONE | UDMA_ARB_1);
            DMA_setChannelTransfer(UDMA_PRI_SELECT | DMA_CH0_EUSCIA0TX, UDMA_MODE_BASIC, data_array1[swapbuffer],(void*)UART_getTransmitBufferAddressForDMA(EUSCI_A0_BASE), SIZE_BUFF_TX);
            DMA_enableChannel(0);
        }
    
        DMA_setChannelControl (DMARX | UDMA_PRI_SELECT,UDMA_SIZE_8 | UDMA_SRC_INC_NONE | UDMA_DST_INC_8 | UDMA_ARB_1);
    
        if(swapbuffer==0)
            swapbuffer=1;
        else
            swapbuffer=0;
    
        DMA_setChannelTransfer(DMARX | UDMA_PRI_SELECT,UDMA_MODE_BASIC,(void *) SPI_getReceiveBufferAddressForDMA(EUSCI_B1_BASE),data_array1[swapbuffer],SIZE_BUFF_TX);
        DMA_enableChannel(DMARX_Channel);
    }
    void DMA_INT1_IRQHandler(void)
    {
        DMA_clearInterruptFlag(INT_DMA_INT1);
        ADS131A02_CS_Disable();
        DMA_setChannelControl (DMATX | UDMA_PRI_SELECT,UDMA_SIZE_8 | UDMA_SRC_INC_NONE | UDMA_DST_INC_NONE | UDMA_ARB_1);
        DMA_setChannelTransfer(DMATX | UDMA_PRI_SELECT,UDMA_MODE_BASIC, data_array,(void *) SPI_getTransmitBufferAddressForDMA(EUSCI_B1_BASE),6);
    
    }
    void PORT3_IRQHandler(void)
    {
        uint_fast16_t status = GPIO_getEnabledInterruptStatus(GPIO_PORT_P3);
        GPIO_clearInterruptFlag(GPIO_PORT_P3, status);
    
         if(status & GPIO_PIN2)
         {
             ADS131A02_CS_Enable();
             DMA_enableChannel(DMATX_Channel);
         }
    }

    Now it is working and not loosing any INT data! 

**Attention** This is a public forum