ISR for Bare metal

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

ISR for Bare metal

899 次查看
aalokshah
Contributor I

Hello guys, can any body explain me how to write interrupt routines in bare metal project???..... i am using pxn2020 freescale module....

标签 (1)
0 项奖励
回复
1 回复

732 次查看
stanish
NXP Employee
NXP Employee

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

0 项奖励
回复