Part Number: TMS320F280025
I set up two interrupt,CPU_Timer1 interrput of 100us and ADCA interrupt of 50us.I didn't cofigurate the interrupt priority.I find the CPU_Timer1 interrput has a higher priority than ADCA interrupt.However,I want ADCA interrupt has a higher interrupt than CPU_Timer1 interrput。What code should I add to my interrupt to achieve my goal.
ADCA interrupt isr function:
__interrupt void adcA1ISR(void)
{
ADC_clearInterruptStatus(ADCA_BASE, ADC_INT_NUMBER1);
if(true == ADC_getInterruptOverflowStatus(ADCA_BASE, ADC_INT_NUMBER1))
{
ADC_clearInterruptOverflowStatus(ADCA_BASE, ADC_INT_NUMBER1);
ADC_clearInterruptStatus(ADCA_BASE, ADC_INT_NUMBER1);
}
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
}
CPU_Timer1 interrput:
__interrupt void cpuTimer1ISR(void)
{
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
}
I tried to modify my code according to demo code:"interrupt_ex2_sw_prioritization",the modfied code is as following:
ADCA interrupt isr function:
__interrupt void adcA1ISR(void)
{
volatile uint16_t tempPIEIER = HWREGH(PIECTRL_BASE + PIE_O_IER1);
IER |= M_INT1;
IER &= MINT1;
HWREGH(PIECTRL_BASE + PIE_O_IER1) &= MG1_7;
Interrupt_clearACKGroup(0xFFFFU);
__asm(" NOP");
EINT;
ADC_clearInterruptStatus(ADCA_BASE, ADC_INT_NUMBER1);
if(true == ADC_getInterruptOverflowStatus(ADCA_BASE, ADC_INT_NUMBER1))
{
ADC_clearInterruptOverflowStatus(ADCA_BASE, ADC_INT_NUMBER1);
ADC_clearInterruptStatus(ADCA_BASE, ADC_INT_NUMBER1);
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
DINT;
HWREGH(PIECTRL_BASE + PIE_O_IER1) = tempPIEIER;
}
CPU_Timer1 interrput:
__interrupt void cpuTimer1ISR(void)
{
IER &= MINT13;
EINT;
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
DINT;
}
What mistakes did I make?I would appreciate that if you can help me to modify my code?





