30.01.2015 Views

UM10211 - Standard ICs

UM10211 - Standard ICs

UM10211 - Standard ICs

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

NXP Semiconductors<br />

<strong>UM10211</strong><br />

Chapter 31: LPC2300 RealMonitor<br />

– Undef exception caused by the undefined instructions in user foreground<br />

application. This indicates an error in the application being debugged. RealMonitor<br />

stops the user application until a "Go" packet is received from the host.<br />

When one of these exceptions occur that is not handled by user application, the following<br />

happens:<br />

4. How to Enable RealMonitor<br />

• RealMonitor enters a loop, polling the DCC. If the DCC read buffer is full, control is<br />

passed to rm_ReceiveData() (RealMonitor internal function). If the DCC write buffer is<br />

free, control is passed to rm_TransmitData() (RealMonitor internal function). If there is<br />

nothing else to do, the function returns to the caller. The ordering of the above<br />

comparisons gives reads from the DCC a higher priority than writes to the<br />

communications link.<br />

• RealMonitor stops the foreground application. Both IRQs and FIQs continue to be<br />

serviced if they were enabled by the application at the time the foreground application<br />

was stopped.<br />

The following steps must be performed to enable RealMonitor. A code example which<br />

implements all the steps can be found at the end of this section.<br />

4.1 Adding Stacks<br />

User must ensure that stacks are set up within application for each of the processor<br />

modes used by RealMonitor. For each mode, RealMonitor requires a fixed number of<br />

words of stack space. User must therefore allow sufficient stack space for both<br />

RealMonitor and application.<br />

RealMonitor has the following stack requirements:<br />

Table 544. RealMonitor stack requirement<br />

Processor Mode<br />

RealMonitor Stack Usage (Bytes)<br />

Undef 48<br />

Prefetch Abort 16<br />

Data Abort 16<br />

IRQ 8<br />

4.2 IRQ Mode<br />

A stack for this mode is always required. RealMonitor uses two words on entry to its<br />

interrupt handler. These are freed before nested interrupts are enabled.<br />

4.3 Undef Mode<br />

A stack for this mode is always required. RealMonitor uses 12 words while processing an<br />

undefined instruction exception.<br />

4.4 SVC Mode<br />

RealMonitor makes no use of this stack.<br />

<strong>UM10211</strong>_1<br />

© NXP B.V. 2007. All rights reserved.<br />

User manual Rev. 01 — 27 March 2007 573 of 613

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!