Part Number: TMS320F280025
Other Parts Discussed in Thread: C2000WARE
Dear Champs,
I am asking this for our customer.
In the nesting ISRs example,
C:\TI\c2000\C2000Ware_3_02_00_00\driverlib\f28002x\examples\interrupt\interrupt_ex2_sw_prioritization.c
Questions:
1. In "__interrupt void cpuTimer0ISR(void)", why is there no ack like "Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);"?
2. The user wants to clear ADCINT flag and ack in ADCC1ISR like below
AdccRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;
if(AdccRegs.ADCINTOVF.bit.ADCINT1 == 1) //ADCINT overflow
{
AdccRegs.ADCINTFLGCLR.bit.ADCINT1 = 1; //clear INT1 again
}
//
// Acknowledge the interrupt
//
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
Should the user put the above codes in between EINT and DINT or in the last of the ISR (i.e., after HWREGH(PIECTRL_BASE + PIE_O_IER1) = tempPIEIER;) of below codes?
__interrupt void adcC1ISR(void)
{
//
// Save IER register on stack
//
volatile uint16_t tempPIEIER = HWREGH(PIECTRL_BASE + PIE_O_IER1);
//
// Set the global and group priority to allow CPU interrupts
// with higher priority
//
IER |= M_INT1;
IER &= MINT1;
HWREGH(PIECTRL_BASE + PIE_O_IER1) &= MG1_3;
//
// Enable Interrupts
//
Interrupt_clearACKGroup(0xFFFFU);
__asm(" NOP");
EINT;
//
// Insert ISR code here
//
//
// Disable interrupts and restore registers saved:
//
DINT;
HWREGH(PIECTRL_BASE + PIE_O_IER1) = tempPIEIER;
}
Wayne Huang