AT91SAM926中断问题
使用EBD9261开发板,使用PA24作为中断输入,申请的中断号码为AT91-PIN-PA24,可以申请成功,如下所示,但是不知道该通过什么函数设置触发方式,s3c4210中有set_external_irq函数,AT91SAM9261中改用什么,怎样禁用中断,中断发生时会出现告警信息,什么含义阿
root@ebd9261:/mnt/anjian# cat /proc/interrupts
CPU0
1: 329965 AT91SAM9261 Timer, at91_serial
10: 0 at91_udc
12: 2 spi.0
15: 0 at91snd
20: 0 ohci_hcd:usb1
21: 0 sidsa-lcdc
29: 0 ts
56: 3 keyboard
93: 1 at91_udc
107: 26102 eth0
Err: 0
irq56: bogus retval mask 12
Pid: 0, comm: swapper
CPU: 0
PC is at default_idle+0x4c/0x54
LR is at default_idle+0x40/0x54
pc : [<c002455c>] lr : [<c0024550>] Not tainted
sp : c02d9f9c ip : c02d9fac fp : c02d9fa8
r10: 2001d604 r9 : 41069265 r8 : 2001d634
r7 : c035a038 r6 : c0340ee8 r5 : c02d8000 r4 : c0024510
r3 : 60000013 r2 : 0005217f r1 : 0005317f r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 Segment kernel
Control: 5317F Table: 23098000 DAC: 00000017
[<c00247fc>] (show_regs+0x0/0x4c) from [<c00238c4>] (report_bad_irq+0x6c/0xcc)
r4 = C02D9F54
[<c0023858>] (report_bad_irq+0x0/0xcc) from [<c0023a14>] (do_simple_IRQ+0x68/0x)
r5 = 00000038 r4 = C0337DC4
[<c00239ac>] (do_simple_IRQ+0x0/0x70) from [<c002cf44>] (gpio_irq_handler+0x68/)
r6 = 00000001 r5 = C0337DC4 r4 = 00000039
[<c002cedc>] (gpio_irq_handler+0x0/0x90) from [<c0023c54>] (asm_do_IRQ+0x50/0x1)
[<c0023c04>] (asm_do_IRQ+0x0/0x14c) from [<c00229a4>] (__irq_svc+0x24/0x60)
[<c0024510>] (default_idle+0x0/0x54) from [<c00245ac>] (cpu_idle+0x48/0x64)
[<c0024564>] (cpu_idle+0x0/0x64) from [<c0022024>] (__init_end+0x24/0x2c)
r5 = C0336E1C r4 = 00000000
[<c0022000>] (__init_end+0x0/0x2c) from [<c000896c>] (start_kernel+0x174/0x1bc)
[<c00087f8>] (start_kernel+0x0/0x1bc) from [<20008094>] (0x20008094)
[<c00279c0>] (dump_stack+0x0/0x14) from [<c00238c8>] (report_bad_irq+0x70/0xcc)
[<c0023858>] (report_bad_irq+0x0/0xcc) from [<c0023a14>] (do_simple_IRQ+0x68/0x)
r5 = 00000038 r4 = C0337DC4
[<c00239ac>] (do_simple_IRQ+0x0/0x70) from [<c002cf44>] (gpio_irq_handler+0x68/)
r6 = 00000001 r5 = C0337DC4 r4 = 00000039
[<c002cedc>] (gpio_irq_handler+0x0/0x90) from [<c0023c54>] (asm_do_IRQ+0x50/0x1)
[<c0023c04>] (asm_do_IRQ+0x0/0x14c) from [<c00229a4>] (__irq_svc+0x24/0x60)
[<c0024510>] (default_idle+0x0/0x54) from [<c00245ac>] (cpu_idle+0x48/0x64)
[<c0024564>] (cpu_idle+0x0/0x64) from [<c0022024>] (__init_end+0x24/0x2c)
r5 = C0336E1C r4 = 00000000
[<c0022000>] (__init_end+0x0/0x2c) from [<c000896c>] (start_kernel+0x174/0x1bc)
[<c00087f8>] (start_kernel+0x0/0x1bc) from [<20008094>] (0x20008094)
handlers:
[<bf00008c>] (eint_key+0x0/0x1c [keyboard])
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
2.6内核中调用irq_request()会自动使能相应中断,free_irq()会禁用相应中断,这些都是在做内核移植的时候就做好了的,如果你觉得这还不能满足你的需求的话,就要自己研究MCU的datasheet读写相关寄存器来开关中断了。。。
我中断发生时,会发生一系列的告警信息,怎么回事阿?信息如下:
还有我需要做键盘消抖,要禁用中断,我的AIC—SMR[0--31],只有0-31,怎样改变AT91_PIN_PA24(56号)中断的触发方式
要禁用中断,直接通过IDDR,ICCR寄存器设置,好像不怎么起作用。
告警信息
irq56: bogus retval mask 12
Pid: 0, comm: swapper
CPU: 0
PC is at default_idle+0x4c/0x54
LR is at default_idle+0x40/0x54
pc : [<c002455c>] lr : [<c0024550>] Not tainted
sp : c02d9f9c ip : c02d9fac fp : c02d9fa8
r10: 2001d604 r9 : 41069265 r8 : 2001d634
r7 : c035a038 r6 : c0340ee8 r5 : c02d8000 r4 : c0024510
r3 : 60000013 r2 : 0005217f r1 : 0005317f r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 Segment kernel
Control: 5317F Table: 23098000 DAC: 00000017
[<c00247fc>] (show_regs+0x0/0x4c) from [<c00238c4>] (report_bad_irq+0x6c/0xcc)
r4 = C02D9F54
[<c0023858>] (report_bad_irq+0x0/0xcc) from [<c0023a14>] (do_simple_IRQ+0x68/0x)
r5 = 00000038 r4 = C0337DC4
[<c00239ac>] (do_simple_IRQ+0x0/0x70) from [<c002cf44>] (gpio_irq_handler+0x68/)
r6 = 00000001 r5 = C0337DC4 r4 = 00000039
[<c002cedc>] (gpio_irq_handler+0x0/0x90) from [<c0023c54>] (asm_do_IRQ+0x50/0x1)
[<c0023c04>] (asm_do_IRQ+0x0/0x14c) from [<c00229a4>] (__irq_svc+0x24/0x60)
[<c0024510>] (default_idle+0x0/0x54) from [<c00245ac>] (cpu_idle+0x48/0x64)
[<c0024564>] (cpu_idle+0x0/0x64) from [<c0022024>] (__init_end+0x24/0x2c)
r5 = C0336E1C r4 = 00000000
[<c0022000>] (__init_end+0x0/0x2c) from [<c000896c>] (start_kernel+0x174/0x1bc)
[<c00087f8>] (start_kernel+0x0/0x1bc) from [<20008094>] (0x20008094)
[<c00279c0>] (dump_stack+0x0/0x14) from [<c00238c8>] (report_bad_irq+0x70/0xcc)
[<c0023858>] (report_bad_irq+0x0/0xcc) from [<c0023a14>] (do_simple_IRQ+0x68/0x)
r5 = 00000038 r4 = C0337DC4
[<c00239ac>] (do_simple_IRQ+0x0/0x70) from [<c002cf44>] (gpio_irq_handler+0x68/)
r6 = 00000001 r5 = C0337DC4 r4 = 00000039
[<c002cedc>] (gpio_irq_handler+0x0/0x90) from [<c0023c54>] (asm_do_IRQ+0x50/0x1)
[<c0023c04>] (asm_do_IRQ+0x0/0x14c) from [<c00229a4>] (__irq_svc+0x24/0x60)
[<c0024510>] (default_idle+0x0/0x54) from [<c00245ac>] (cpu_idle+0x48/0x64)
[<c0024564>] (cpu_idle+0x0/0x64) from [<c0022024>] (__init_end+0x24/0x2c)
r5 = C0336E1C r4 = 00000000
[<c0022000>] (__init_end+0x0/0x2c) from [<c000896c>] (start_kernel+0x174/0x1bc)
[<c00087f8>] (start_kernel+0x0/0x1bc) from [<20008094>] (0x20008094)
handlers:
[<bf00008c>] (eint_key+0x0/0x1c [keyboard])
[ 本帖最后由 zhang9721 于 2009-3-3 16:55 编辑 ]