Interrupt handler

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Interrupt handler

跳至解决方案
1,307 次查看
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 项奖励
回复
1 解答
1,098 次查看
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 项奖励
回复
1 回复
1,099 次查看
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 项奖励
回复