调试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.