ARM Technical Support Knowledge Articles

FORCE A VALUE TO AN SFR FROM THE DEBUGGER

Applies to: ISD51 In-System Debugger

Answer


Information in this article applies to:


QUESTION

Can I write a value to an SFR, using the Keil debugger and ISD51?

ANSWER

Yes, ISD51 comes with the ability to write to the following SFRs:

If you want to write to a different register, you'll need to add code to ISD51.A51.

For example, to add the ability to write to R1, add the following to the public definitions:

PUBLIC ?ISD?WRITESFR04

Then add the following routine:

?ISD?WRITESFR04:
                MOV     P1,A
                AJMP    ?ISD?CMDLOOP

To add more SFRs, write identical functions for each, changing only the SFR name and the function number. All functions must be named ?ISD?WRITESFRxx, where "xx" is the function number. The numbers must be consecutive.

Make sure the SFR is defined in ISD51.A51, if not you'll need to add an sfr statement to the file.

There are no other modifications necessary to your project. The debugger will scan ISD51.A51 to determine which SFRs can be written.

Article last edited on: 2004-05-01 21:11:45

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