AnsweredAssumed Answered

i.MX28 Bare Metal Interrupt Handler

Question asked by David Lawson on Aug 29, 2013
Latest reply on Sep 2, 2013 by Anson Huang
Branched to a new discussion

Hi,


I'm creating a bare metal application as Linux or Win CE are way too complex for my application, I'm having a problem getting my interrupt handler to work. I have the Freescale IMX_OBDS project which has a vectors.s file, this contains the exception handlers for the core but does not demonstrate how to action an interrupt exception. I'd be grateful if anyone could provide a code example for this.


IMX_OBDS has exception vector definitions but doesn't use them:

 

startup_vectors:

        ldr     pc, reset_addr

        ldr     pc, undefined_addr

        ldr     pc, swi_addr

        ldr     pc, prefetch_addr

        ldr     pc, abort_addr

        nop                             /* reserved vector */

        ldr     pc, irq_addr

        ldr     pc, fiq_addr


reset_addr:      .word     startup

undefined_addr:  .word     undefined_handler

swi_addr:        .word     swi_handler

prefetch_addr:   .word     prefetch_handler

abort_addr:      .word     abort_handler

irq_addr:        .word     irq_handler

fiq_addr:        .word     fiq_handler

 

/*!

* Exception Handlers

*/

undefined_handler:

        b       undefined_handler

swi_handler:

        b       swi_handler

prefetch_handler:

        b       prefetch_handler

abort_handler:

        b       abort_handler

irq_handler:

        b       irq_handler

fiq_handler:

        b       fiq_handler

Outcomes