Interrupt handler

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interrupt handler

Jump to solution
696 Views
irmantasbudrys
Contributor III

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

0 Kudos
1 Solution
487 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

Customer could find the __isr_vector table located at <startup_SKEAZ1284.S> file.

It will indicate the ADC module interrupt service routine related ISR function is ADC_IRQHandler.

pastedImage_1.png


Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
488 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

Customer could find the __isr_vector table located at <startup_SKEAZ1284.S> file.

It will indicate the ADC module interrupt service routine related ISR function is ADC_IRQHandler.

pastedImage_1.png


Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos