Enabling Interrupts in U-boot for ARM cortex A-9 -


i trying configure gpio interrupt in uboot, test interrupt response time without os intervention (bare-metal). able configure pin-muxing , successful in setting interrupt gpio pin.

my question regarding registering of interrupt service routine. see interrupt vector table platform @ address 0xffff0000 ( read system control register find out this). interrupt id gpio 56 , calculated address interrupt service routine should reside , tried writing address pointer isr routine. right way of doing it? or have take care of other things context saving etc myself?

note : using arm cortex a-9.

edit :

based on answers went through code have following questions. definition of

do_irq architecture( arm v7) not doing , config_use_irq not work me since functions arch_interrupt_init not defined me. can conclude interrupts not supported architecture. if have define on own functions need implement working? since small part of proj , want see if can feasible implement. want know if requires few lines of code or requires effort implement interrupt support.

the arm vectors interrupts address 0xffff0018 (or 0x00000018). typically unconditional branch. code inspect interrupt controller hardware determine number 56. typically, there routine set handler interrupt number, don't manually patch code; table dependent on how u-boot interrupt handling implemented.

in u-boot sourcenote, interrupt table looks this,

.globl _start _start:     b       reset     ldr     pc, _undefined_instruction     ldr     pc, _software_interrupt     ldr     pc, _prefetch_abort     ldr     pc, _data_abort     ldr     pc, _not_used     ldr     pc, _irq     ldr     pc, _fiq ... _irq:         .word irq 

so _irq label install routine interrupt handling; assembler in same file , calls do_irq(), based on config_use_irq. part of api in *lib_arm/interrupts.c*. cpus defined handler irqs, such cpu/arm720t/interrupts.c, s3c4510b. here can see code gets register controller , branches table.

so default u-boot doesn't seem have support interrupts. not surprising boot loader polling based simplicity , speed.

note: u-boot base on 2009.01-rc3.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -