Clearing Analog Die Interrupt Sources - Analog Devices ADuCM355 Hardware Reference Manual

Hide thumbs Also See for ADuCM355:
Table of Contents

Advertisement

ADuCM355
Hardware Reference Manual
Table 42. Analog Die Interrupts List
Exception
Number
IRQx
64
IRQ48
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);
NVIC_EnableIRQ(AFE_ADC_IRQn);
}
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;
delay(100);
clocks
}
Interrupt Enable
Interrupt Enable
Register
Register Bit
ADCINTIEN
ADCRDYIEN
DFTRDYIEN
SINC2RDYIEN
TEMPRDYIEN
ADCMINFAILIEN
ADCMAXFAILIEN
ADCDELTAFAILIEN
MEANIEN
// Ensure the delay equates to 10 >=30x analog die System
Interrupt Status
Register
ADCINTSTA
// Select ADCReady as interrupt source
// Enable AFE_ADC interrupt source in NVIC
// Clear Timeout IRQ
Rev. B | Page 45 of 312
UG-1262
Interrupt Status
Register Bit
ADCRDY
DFTRDY
SINC2RDY
TEMPRDY
ADCMINERR
ADCMAXERR
ADCDIFFERR
MEANRDY

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ADuCM355 and is the answer not in the manual?

Table of Contents