10 rmtarget initialization, 11 code example, Figure 35–151 – NXP Semiconductors LPC24XX UM10237 User Manual

Page 753: Illustrates, Nxp semiconductors

Advertising
background image

UM10237_4

© NXP B.V. 2009. All rights reserved.

User manual

Rev. 04 — 26 August 2009

753 of 792

NXP Semiconductors

UM10237

Chapter 35: LPC24XX RealMonitor

4.10 RMTarget initialization

While the processor is in a privileged mode, and IRQs are disabled, user must include a
line of code within the start-up sequence of application to call rm_init_entry().

4.11 Code example

The following example shows how to setup stack, VIC, initialize RealMonitor and share
non vectored interrupts:

IMPORT rm_init_entry

IMPORT rm_prefetchabort_handler

IMPORT rm_dataabort_handler

IMPORT rm_irqhandler2

IMPORT rm_undef_handler

IMPORT User_Entry ;Entry point of user application.

CODE32

ENTRY

;Define exception table. Instruct linker to place code at address 0x0000 0000

AREA exception_table, CODE

LDR pc, Reset_Address

LDR pc, Undefined_Address

LDR pc, SWI_Address

LDR pc, Prefetch_Address

LDR pc, Abort_Address

Fig 151. Exception handlers

RM_UNDEF_HANDLER()
RM_PREFETCHABORT_HANDLER()
RM_DATAABORT_HANDLER()
RM_IRQHANDLER()

RESET

FIQ

IRQ

RESERVED

DATA ABORT

PREFETCH

ABORT

SWI

UNDEF

RealMonitor supplied exception vector handlers

sharing IRQs between RealMonitor and user IRQ handler

OR

APP_IRQDISPATCH

RM_IRQHANDLER2()

APP_IRQHANDLER2()

Advertising