MPC5744P Reasign INTC Interrupt Handler

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

MPC5744P Reasign INTC Interrupt Handler

跳至解决方案
3,905 次查看
moaheux
Contributor I

Hi,

I'm struggling with the INTCinterrupt handler. I did create a bootloader and scheduled a function to be called every 1ms using 

INTC_InstallINTCInterruptHandler(PIT_ISR0, (uint8_t) (PIT_INTERRUPT_VECTOR_CH0), (uint8_t) priority);
 
void PIT_ISR0() {
    dummy();   
    PIT_0.TIMER[0].TFLG.R = 1;
}
Everything is working fine till I jump to the application and it appear that I can't update a vector previously set with a new Function.
 
Would you have any tips how to de-initialize the INTC properly ?

Thanks in advance.
0 项奖励
回复
1 解答
3,886 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

the most important thing is to disable all interrupts on all levels before jump to an application: by MSR[EE] bit, by local enable bits in peripherals, by priorities in INTC. This is usually the reason for most of the troubles. It's also good idea to de-initialize all used peripherals to default reset state.

Regards,

Lukas

在原帖中查看解决方案

2 回复数
3,869 次查看
moaheux
Contributor I

Hi lukaszadrapa,

You found exactly the good point I missed the MSR[EE] bit. It' now working like a charm. Thanks a lot, I wasted so much time on it.

I'll attach my sample code to this thread so people with the same problem will have the chance to go through.

0 项奖励
回复
3,887 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

the most important thing is to disable all interrupts on all levels before jump to an application: by MSR[EE] bit, by local enable bits in peripherals, by priorities in INTC. This is usually the reason for most of the troubles. It's also good idea to de-initialize all used peripherals to default reset state.

Regards,

Lukas