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.

TMS320F280049: ADC interrupt problem

Genius 3095 points
Part Number: TMS320F280049

Dear team:

I used EPWM6_SOCA to trigger 4 SOC channels (SOC0~3) in 3 ADC modules (ADCA, ADCB, ADCC) of TMS320F280049. Each SOC3 channel of the three ADC modules will trigger a INT_ADCxy interrupt.

EPWM6_SOCA ---> ADCASOC0~3, ADCASOC3 ---> INT_ADCA1

EPWM6_SOCA ---> ADCBSOC0~3, ADCBSOC3 ---> INT_ADCB1

EPWM6_SOCA ---> ADCCSOC0~3, ADCCSOC3 ---> INT_ADCC1

At the beginning of operation, all three interrupts can enter normally. After running for a period of time, some interrupts cannot enter, or all three interrupts cannot enter. What could be the reason?

Below is the code:

#define TRIGGER_SOURCE_3 ADC_TRIGGER_EPWM6_SOCA  //Trigger source

//Configuration of 3 ADC modules
//adca ADC_setVREF(ADCA_BASE, ADC_REFERENCE_MODE, ADC_REFERENCE_VOLT); ADC_setPrescaler(ADCA_BASE,ADC_CLK_DIV); ADC_setInterruptPulseMode(ADCA_BASE, ADC_PULSE_END_OF_CONV); ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER0, TRIGGER_SOURCE_3,BAT_CHARG_CUR_CH, SAMPLE_WINDOW); ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER1, TRIGGER_SOURCE_3,MDL_CUR_CH, SAMPLE_WINDOW); ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER2, TRIGGER_SOURCE_3,PT100A_CH, SAMPLE_WINDOW); ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER3, TRIGGER_SOURCE_3,OUTPUT_NTC1_CH, SAMPLE_WINDOW); ADC_setInterruptSource(ADCA_BASE,ADC_INT_NUMBER1,ADC_SOC_NUMBER3); // ADC_enableInterrupt(ADCA_BASE,ADC_INT_NUMBER1); Interrupt_enable(INT_ADCA1); Interrupt_register(INT_ADCA1, &adcaInterrupt_1); Interrupt_enableInCPU(INTERRUPT_CPU_INT1); ADC_enableConverter(ADCA_BASE); //adcb ADC_setVREF(ADCB_BASE, ADC_REFERENCE_MODE, ADC_REFERENCE_VOLT); ADC_setPrescaler(ADCB_BASE,ADC_CLK_DIV); ADC_setInterruptPulseMode(ADCB_BASE, ADC_PULSE_END_OF_CONV); ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER0, TRIGGER_SOURCE_3,BAIS_FAULT_CH, SAMPLE_WINDOW); ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER1, TRIGGER_SOURCE_3,PT100B_CH, SAMPLE_WINDOW); ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER2, TRIGGER_SOURCE_3,OUTPUT_NTC2_CH, SAMPLE_WINDOW); ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER3, TRIGGER_SOURCE_3,OUTPUT_NTC2_CH, SAMPLE_WINDOW); ADC_setInterruptSource(ADCB_BASE,ADC_INT_NUMBER1,ADC_SOC_NUMBER3); // ADC_enableInterrupt(ADCB_BASE,ADC_INT_NUMBER1); Interrupt_enable(INT_ADCB1); Interrupt_register(INT_ADCB1, &adcbInterrupt_1); Interrupt_enableInCPU(INTERRUPT_CPU_INT1); ADC_enableConverter(ADCB_BASE); //adcc ADC_setVREF(ADCC_BASE, ADC_REFERENCE_MODE, ADC_REFERENCE_VOLT); ADC_setPrescaler(ADCC_BASE,ADC_CLK_DIV); ADC_setInterruptPulseMode(ADCC_BASE, ADC_PULSE_END_OF_CONV); ADC_setupSOC(ADCC_BASE, ADC_SOC_NUMBER0, TRIGGER_SOURCE_3,LOAD_VOLT_CH, SAMPLE_WINDOW); ADC_setupSOC(ADCC_BASE, ADC_SOC_NUMBER1, TRIGGER_SOURCE_3,BAT_DISCHARG_CUR_CH, SAMPLE_WINDOW); ADC_setupSOC(ADCC_BASE, ADC_SOC_NUMBER2, TRIGGER_SOURCE_3,MDL_VOLT_CH, SAMPLE_WINDOW); ADC_setupSOC(ADCC_BASE, ADC_SOC_NUMBER3, TRIGGER_SOURCE_3,CRTL_BOARD_TEMP_CH, SAMPLE_WINDOW); ADC_setInterruptSource(ADCC_BASE,ADC_INT_NUMBER1,ADC_SOC_NUMBER3); // ADC_enableInterrupt(ADCC_BASE,ADC_INT_NUMBER1); Interrupt_enable(INT_ADCC1); Interrupt_register(INT_ADCC1, &adccInterrupt_1); Interrupt_enableInCPU(INTERRUPT_CPU_INT1); ADC_enableConverter(ADCC_BASE);
//Configuration of three interrupts
__interrupt void adcaInterrupt_1(void) { ADC_clearInterruptStatus(ADCA_BASE, ADC_INT_NUMBER1); Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1); } __interrupt void adcbInterrupt_1(void) { ADC_clearInterruptStatus(ADCB_BASE, ADC_INT_NUMBER1); Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1); } __interrupt void adccInterrupt_1(void) { ADC_clearInterruptStatus(ADCC_BASE, ADC_INT_NUMBER1); Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1); }

During debugging:

ADCINTFLAG.ACINT1 has been set to 1
ADCINTSEL1N2.INT1SEL has been set to 1
ADCINTOVF.ACINT1 has been set to 1

But can not enter the interrupt

TMS320F280049