Hello guys, can any body explain me how to write interrupt routines in bare metal project???..... i am using pxn2020 freescale module....
Hello Aalok Shah,
Which version of CodeWarrior are you using?
If you create a project using CodeWarrior Wizard there are some interrupt support routines are already included (software vector mode). For core 0 you need to:
1) Create your ISR function
e.g. void SwIrq4ISR(void);
2) Initialize INTC Handler table with your ISR routine:
INTC_InstallINTCInterruptHandler(interrupt handler, IRQ# ,IRQ priority) */
/* where: interrupt handler - interrupt handler function
IRQ# - interrupt vector - see PXN2020 RM, INTC chapter,
IRQ priority - priority of this IRQ */
INTC_InstallINTCInterruptHandler(SwIrq4ISR, 4, 1);
3) Set INTC CPR register to enable interrupts of all interrupt levels:
INTC.CPR.R = 0;
Hope it helps.
Stan