UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
6,025 Views
Registered: ‎11-16-2012

Sharing interrupt handler program with IRQ_line ?

Dear Colleague, 

 

Thanking you all for your support !

 

I will be glad if someone can guide me here how to share my interrupt handler (say just printing hallo). with one of the already assigned lines like 62 or 64.  

 

root@zynq:~# cat /proc/interrupts
CPU0 CPU1
16: 0 0 GIC 27 gt
17: 0 0 GIC 43 ttc_clockevent
18: 78707 14975 GIC 29 twd
21: 43 0 GIC 39 f8007100.adc
24: 1216 0 GIC 57 cdns-i2c
26: 0 0 GIC 35 f800c000.ocmc
27: 177 0 GIC 82 xuartps
28: 3 0 GIC 51 e000d000.spi
29: 76628 0 GIC 54 eth0
30: 32 0 GIC 56 mmc0
31: 0 0 GIC 45 f8003000.dmac
32: 0 0 GIC 46 f8003000.dmac
33: 0 0 GIC 47 f8003000.dmac
34: 0 0 GIC 48 f8003000.dmac
35: 0 0 GIC 49 f8003000.dmac
36: 0 0 GIC 72 f8003000.dmac
37: 0 0 GIC 73 f8003000.dmac
38: 0 0 GIC 74 f8003000.dmac
39: 0 0 GIC 75 f8003000.dmac
40: 0 0 GIC 40 f8007000.devcfg
46: 0 0 GIC 53 e0002000.usb
47: 0 0 GIC 41 f8005000.watchdog
62: 0 0 zynq-gpio 12 sw14
64: 0 0 zynq-gpio 14 sw13
IPI1: 0 0 Timer broadcast interrupts
IPI2: 1637 3072 Rescheduling interrupts
IPI3: 0 0 Function call interrupts
IPI4: 16 29 Single function call interrupts
IPI5: 0 0 CPU stop interrupts
IPI6: 0 0 IRQ work interrupts
IPI7: 0 0 completion interrupts
Err: 0

 

I want to excute some program say printing Hallo_world whenver I press (64: 0 0 zynq-gpio 14 sw13) SW13. I have no idea how to proceed with this. I will be really grateful if somecan can help me over here.

 

With Warm regards

 

 

 

 

 

0 Kudos
1 Reply
Scholar milosoftware
Scholar
6,007 Views
Registered: ‎10-26-2012

Re: Sharing interrupt handler program with IRQ_line ?

From the look of it, I'd guess that the button is mapped to a "keyboard" key. So just wait for the keypress like you'd wait on a keypress in any program (e.g. process /dev/input/event0 or so).

0 Kudos