AnsweredAssumed Answered

Interrupt handler

Question asked by irmantasbudrys on Nov 28, 2016
Latest reply on Nov 29, 2016 by Hui_Ma

Hello, 

 

I am using FRDM DEV BRD KEAZ128 and S32. 

I am trying to understand how interrupts are working. Lets take as example from FRDM-KEA-QSP package example project Lab5_ADC_KEA128 where ADC generates interrupt after every conversion. How does processor understands what it needs to go to void ADC_IRQHandler() function ? This function is not described in the main(). Can I give for interrupt handler function any name (for example my_adc_irq () ) or it must have fixed name? If yes where are these names described ? 

 

 

int main(void)
{
/* Initialize Core Clock to 40MHz, Bus Clock to 20MHz */
Clk_Init();

/* Configure button pins as inputs and LED pins as outputs */
GPIO_Init();

/* Initialize the ADC module and read at Channel 10 and 8bit conversion mode is imposed */
ADC_Init(10,0);

/* Enable FTM2 interrupt */
Enable_Interrupt(ADC_IRQn);

while(1);

return 0;
}

 

 

Best Regards,

IB

Outcomes