MPC5744P Reasign INTC Interrupt Handler

cancel
Showing results for 
Search instead for 
Did you mean: 

MPC5744P Reasign INTC Interrupt Handler

Jump to solution
206 Views
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 Kudos
1 Solution
187 Views
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

View solution in original post

2 Replies
171 Views
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 Kudos
188 Views
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

View solution in original post