共2条
1/1 1 跳转至页
real,view,FIQ 请大侠帮忙解决real view中FIQ中断的问题。
问
用keil的RV编译程序无法进入FIQ中断,我看RV_cc上说用__irq标注FIQ函数可实现FIQ中断可是我用__irq还是不能正确进入FIQ,那位大侠能指点下或者各个示例看看,小弟不胜感谢
答 1:
看看keil的帮助:The following C code implements an empty FIQ_Handler:
__irq void FIQ_Handler (void) {
;
}
In the Startup Code the following modification is required to call this FIQ_Handler:
Vectors LDR PC, Reset_Addr
:
LDR PC, FIQ_Addr ; Instruction at FIQ Vector location
:
PRESERVE8 ; tell linker: stack alignment is 8-byte
IMPORT FIQ_Handler ; use external FIQ_Handler
FIQ_Addr DCD FIQ_Handler ; FIQ Entry point
答 2: 谢谢computer00谢谢computer00,我一直以为改为RV后我没有用正确的函数头标示,也没往启动文件考虑。原来Keil的RV启动文件根本没考虑FIQ的功能,让俺好找呀!严重鄙视一下keil.
__irq void FIQ_Handler (void) {
;
}
In the Startup Code the following modification is required to call this FIQ_Handler:
Vectors LDR PC, Reset_Addr
:
LDR PC, FIQ_Addr ; Instruction at FIQ Vector location
:
PRESERVE8 ; tell linker: stack alignment is 8-byte
IMPORT FIQ_Handler ; use external FIQ_Handler
FIQ_Addr DCD FIQ_Handler ; FIQ Entry point
答 2: 谢谢computer00谢谢computer00,我一直以为改为RV后我没有用正确的函数头标示,也没往启动文件考虑。原来Keil的RV启动文件根本没考虑FIQ的功能,让俺好找呀!严重鄙视一下keil.
共2条
1/1 1 跳转至页
我要赚赏金
