UG-1262
Rev. B | Page 45 of 312
Table 42. Analog Die Interrupts List
Exception
Number
IRQx
Interrupt Enable
Register
Interrupt Enable
Register Bit
Interrupt Status
Register
Interrupt Status
Register Bit
64 IRQ48
ADCINTIEN
ADCRDYIEN ADCINTSTA
ADCRDY
DFTRDYIEN
DFTRDY
SINC2RDYIEN
SINC2RDY
TEMPRDYIEN
TEMPRDY
ADCMINFAILIEN
ADCMINERR
ADCMAXFAILIEN
ADCMAXERR
ADCDELTAFAILIEN
ADCDIFFERR
MEANIEN
MEANRDY
Two steps are required to generate an interrupt request to the NVIC on the digital die:
1.
Configure the corresponding peripheral to generate an interrupt request to the NVIC. Refer to the interrupt enable register bit
column in Table 42.
2.
Configure the NVIC for that peripheral request. Call NVIC_EnableIRQ(IRQn).
The following example function shows how to select the ADC ready (ADCRDY) interrupt source for the die to die interrupt source to
the NVIC:
void AfeAdcInterruptSetup(void)
{
AfeAdcIntCfg(BITM_AFE_ADCINTIEN_ADCRDYIEN); // Select ADCReady as interrupt source
NVIC_EnableIRQ(AFE_ADC_IRQn); // Enable AFE_ADC interrupt source in NVIC
}
void SIP0_IRQHandler()
{
uiIntSta = AfeAdcIntSta();
if (uiIntSta & BITM_AFE_ADCINTSTA_ADCRDY)
{
szADCSamples[i]= AfeAdcRd(RAWADC);
}
}
CLEARING ANALOG DIE INTERRUPT SOURCES
IRQ48, IRQ52, IRQ54, IRQ55, and IRQ57 are interrupt sources from the analog die.
Ensure that the interrupt is fully serviced and the associated interrupt status flags are fully cleared before exiting the interrupt service
routine. If user code exits the interrupt service routine before the interrupt flag is fully cleared, the CPU program counter can repeatedly
vector back into the same interrupt service routine.
In the case of timer interrupts, add a short delay of 30 AFE_SYSCLK periods after clearing the timeout status bit but before exiting the
timer interrupt service routine.
The following is an example interrupt service routine for the Analog Die General-Purpose Timer 0:
// AFE General-Purpose Timer0 Interrupt handler.
void AfeGpTimer0_Int_Handler()
{
ucSecondTimer = 1;
pADI_AGPT0->CLRI0 = 0x1; // Clear Timeout IRQ
delay(100); // Ensure the delay equates to 10 >=30x analog die System
clocks
}