Keil™, An ARM® Company

Technical Support

ISD51: FORCE A VALUE TO AN SFR FROM THE DEBUGGER


Information in this article applies to:

  • ISD51 Version 1.00

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:

  • DPTR
  • B
  • SP
  • P0
  • P3

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.

Last Reviewed: Saturday, May 01, 2004


Did this article provide the answer you needed?
 
Yes
No
Not Sure