# NS9750 External Interrupt Service Routine for Linux

**URL:** <https://forums.digi.com/t/ns9750-external-interrupt-service-routine-for-linux/4787>\
**Category:** NET+OS\
**Created:** [March 16, 2005, 1:20am UTC](https://forums.digi.com/t/ns9750-external-interrupt-service-routine-for-linux/4787 "2005-03-16T01:20:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![puker\_soh](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@puker\_soh](https://forums.digi.com/u/puker_soh)\
**Post date:** [March 16, 2005, 1:20am UTC](https://forums.digi.com/t/ns9750-external-interrupt-service-routine-for-linux/4787/1 "2005-03-16T01:20:24Z")

</div>

Hi,I am trying to write a ISR for external interrupt on NS9750 specifically for a touchscreen PENIRQ singal but so far with no success. First, I set gpio 13 to function 1 (EXT IRQ 0 duplicate). Then I set LVEDG, CLR and PLTY in External Interrupt Control Register. Next, I enable the interrupts by setting IE in Interrupt Config Register 28. Finally, request\_irq is called. My interrupt handler at the moment is just a printk(). Can anyone point out what I’m doing wrong?? I ’ attaching the source code below. Thanks in advance, Terence Soh \>\>\>\>\>\>\>\>\>\>\>\>\>\>snip\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\< request\_gpio( 13, 1, DRIVER\_NAME); set\_gpio\_cfg( 13, NS\_GPIO\_CFG\_FUNC\_1 ); /\* External Interrupt Control Register Configuration _/ writel( NS\_SYS\_EXT\_INT\_CTRL\_LVEDG | NS\_SYS\_EXT\_INT\_CTRL\_CLR | NS\_SYS\_EXT\_INT\_CTRL\_PLTY, NS\_SYS\_EXT\_INT\_CTRL(0) ); /_ Interrupt Configuration Registers _/ i = readl(NS\_SYS\_INT\_CFG\_BASE + 28); i &= 0x1FFFFFFF; i |= 0x80000000; writel(i,NS\_SYS\_INT\_CFG\_BASE + 28); /_ Request IRQ for IRQ0 interrupt \*/ if ( request\_irq( IRQ\_EXT\_0, ns\_ts\_irq\_int, 0, DRIVER\_NAME, 0) ){ printk("ns9750ts\_input.c: Could not allocate External IRQ0!  
"); return -EIO; } \>\>\>\>\>\>\>\>\>\>\>\>\>\>snip\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<

---

<div class="post-metadata">

**Author:** ![jnkarrer](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@jnkarrer](https://forums.digi.com/u/jnkarrer)\
**Post date:** [March 20, 2005, 9:59pm UTC](https://forums.digi.com/t/ns9750-external-interrupt-service-routine-for-linux/4787/2 "2005-03-20T21:59:10Z")

</div>

Hi,Which Linux port are you using ? The one from FS-Forth ? Did you check that external interrupts are decoded in arch/arm/ns9750/irq.c ? Does this Linux-Port programm the Interruptcontroller to 1:1 Mapping between Source IRQ’s and Interrupt Levels ? Jochen

---

<div class="post-metadata">

**Author:** ![puker\_soh](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@puker\_soh](https://forums.digi.com/u/puker_soh)\
**Post date:** [March 31, 2005, 9:01am UTC](https://forums.digi.com/t/ns9750-external-interrupt-service-routine-for-linux/4787/3 "2005-03-31T09:01:14Z")

</div>

Thanks for your reply. I’m using the linux port from FSForth. Managed to get the irq\_handler to respond at active low. It is still a bit weird though. When interrupt is configured to trigger at falling or rising edge, irq\_handler is always called even when there isn’t any edges on the signal. Will leave it alone for now and look at it again later… Is your linux port for the NS9750 evaluation board or your own board? Thanks, Terence Soh.

---

<div class="post-metadata">

**Author:** ![jnkarrer](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@jnkarrer](https://forums.digi.com/u/jnkarrer)\
**Post date:** [March 31, 2005, 6:30pm UTC](https://forums.digi.com/t/ns9750-external-interrupt-service-routine-for-linux/4787/4 "2005-03-31T18:30:34Z")

</div>

Hi,\>Is your linux port for the NS9750 evaluation board or your own board? My Linux works on our board and on the development board. Booting currntly works without U-boot. So you need to do memory controller settings in kernel header. Next version of my emulator will have a clean support of multiple boards, and maybe one year it will have a check of DRAM Timings. Jochen

---

<div class="post-metadata">

**Author:** ![puker\_soh](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@puker\_soh](https://forums.digi.com/u/puker_soh)\
**Post date:** [April 1, 2005, 1:20am UTC](https://forums.digi.com/t/ns9750-external-interrupt-service-routine-for-linux/4787/5 "2005-04-01T01:20:00Z")

</div>

Hi,More questions about your booting. Are you booting from the 8MB flash or the SPI EEPROM. If you are booting from the EEPROM, is there any help avaliable either from NetSilicon or yourself(that is if it is open-source)? Thanks again, Terence Soh
