ARM Technical Support Knowledge Articles

REDIRECTING INTERRUPT VECTORS

Applies to: MON390 Target Monitor

Answer


Information in this article applies to:


QUESTION

I'm using the Dallas 390 in Contiguous Mode and I have installed the Monitor-390 on my target hardware at address 0. Now I need to configure my target program to work with the monitor. What must I do?

ANSWER

The MON390 target monitor switches the MCU into contiguous mode and, when installed starting at address 0000h, redirects all interrupts as specified by the INT_ADR_OFF definition in the INSTALL.A51 file.

When you debug your target program using MON390, you must modify the startup code (START390.A51) for the target program and you may need to set an interrupt vector offset.

In the startup code, the initial LJMP instruction must be replaced with an AJMP instruction. For example:

?C_STARTUP      LABEL   NEAR
                ;DB      02H     ; LJMP in Classic 8051 Mode
                ;DW      WORD0 STARTUP1
                AJMP    STARTUP1 ; AJMP in Contiguous Mode

                RSEG    ?C_C51STARTUP

Since the monitor switches the CPU into contiguous mode the AJMP instruction may be used to jump anywhere in the 64KB CODE memory space.

Other modifications to the startup code depend on the redirection address.

If the monitor redirects interrupts you must enter that starting address under Project - Options for Target - Target - Off-Chip Code memory. For example, if the monitor redirects interrupts to a different 64KB segment with an offset of 0000h (for example C:0x010000), you would enter

EPROM (#1):  Start: 0x10000  Size: 0x40000

The uVision IDE converts this into an LX51 Linker CLASSES directive that contains a CODE memory class starting at C:0x10000.

If the monitor redirects interrupts to a non-zero page offset (for example, C:0x008000 or C:0x018000), you must also change the ?C_CPURESET?0 segment in START390.A51 as follows:

?C_CPURESET?0   SEGMENT CODE OFFS 8000H
                RSEG    ?C_CPURESET?0

MORE INFORMATION

SEE ALSO

Article last edited on: 2006-10-29 19:08:50

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential