Blackrose's Blog Blackrose's Blog

codewarrior中添加ISR

in technologyread (107) 文章转载请注明来源!

调试coldfire52259片子时,使用中断来管理外设。由于我使用的IDE工具版本较高,添加ISR的方法已与之前的不同。 添加步骤:

1.write your own ISR function(this is qspi example)

__declspec(interrupt) void qspi*isr(void) {  
MCF*QSPI*QIR |= MCF*QSPI*QIR*SPIF;
handle_qspi_int();
}

2.Add ISR function to interrupt vector table find exceptions.c file and add this

extern _\_declspec(interrupt) void qspi\_isr();

Next, you can find "number of interrupt vector" that qspi module on the same file. The qspi is vector number 82.

qspi_isr, /* 82 (0x148) Device-specific interrupts */

now, you must rebuild your project.

文章二维码

扫描二维码,在手机上阅读!

发表新评论
博客已萌萌哒运行
© 2018 由 Typecho 强力驱动.Theme by Yodu
前篇 后篇
雷姆
拉姆