source: rtems/c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_init.c @ 1233af3

4.104.114.95
Last change on this file since 1233af3 was 1233af3, checked in by Ralf Corsepius <ralf.corsepius@…>, on 08/20/08 at 05:52:39

Add missing prototypes.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*
2 *  NXP/Philips LPC22XX/LPC21xx Interrupt handler
3 *  Ray 2007 <rayx.cn@gmail.com> to support LPC ARM     
4 *  The license and distribution terms for this file may be
5 *  found in the file LICENSE in this distribution or at
6 *
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *
10 *  $Id$
11 */
12#include <irq.h>
13#include <bsp.h>
14#include <lpc22xx.h>
15
16
17extern void default_int_handler(void);
18
19/*
20 * Interrupt system initialization. Disable interrupts, clear
21 * any that are pending.
22 */
23void BSP_rtems_irq_mngt_init(void)
24{
25  long *vectorTable;
26  int i;
27
28    /* disable all interrupts */
29  VICIntEnClr = 0xFFFFFFFF;
30
31  vectorTable = (long *) VECTOR_TABLE;
32  /* Initialize the vector table contents with default handler */
33  for (i=0; i<BSP_MAX_INT; i++) {
34      *(vectorTable + i) = (long)(default_int_handler);
35  }
36   
37  /*
38   * Set IRQHandler
39   */
40  IRQ_VECTOR_ADDR = 0xE59FF018;           /* LDR PC,[PC,#0x18] instruction */
41
42  /*
43   * Set FIQHandler
44   */
45  FIQ_VECTOR_ADDR = 0xE59FF018;           /* LDR PC,[PC,#0x18] instruction */
46
47  /*
48   * We does not need the next interrupt sources in the moment,
49   * therefore jump to itself.
50   */
51  UNDEFINED_INSTRUCTION_VECTOR_ADDR = 0xEAFFFFFE;
52  SOFTWARE_INTERRUPT_VECTOR_ADDR    = 0xEAFFFFFE;
53  PREFETCH_ABORT_VECTOR_ADDR        = 0xEAFFFFFE;
54
55  /*
56   * In case we must find an ABORT error,
57   * enable the next lines and set a breakpoint
58   * in ABORTHandler.
59   */ 
60#if 1
61  DATA_ABORT_VECTOR_ADDR = 0xE59FF018;
62#endif 
63
64  /*
65   * Init the Vectored Interrupt Controller (VIC)
66   */
67  VICProtection = 0;
68  VICIntSelect = 0;
69  VICVectAddr = 0;
70}
71
Note: See TracBrowser for help on using the repository browser.