FAQs Archive for In-Circuit Emulator for 68HC11

The embedded tools company

Search FAQs

PDF document ( 136KB / 27-Mar-2022 )

How can I program registers, which can be accessed through the first 64 CPU cycles only. (68HC11)
Ref: 0014

In TEST mode, the emulator can access all registers at any time. In EXPANDED or SINGLE mode, the processor must run excecute a RESET. The following example shows, how the eXception. Activate instruction can be used for generating an immediate reset:
; setup operation modes
SYStem.CPU expanded
SYStem.Mode ee
; disable EPROM
Data.Set 3f 04
; map memory
MAP.DEFault 0--0ffff
; define reset vectors
Data.Set 0fffe %Word 1000
Data.Set 0bffe %Word 1000
; load sample program
Data.Assemble 1000--101f nop
Data.Assemble 1020 bra 1020
; example for option register programming
Data.Assemble 1010 ldaa #0
Data.Assemble ,    staa 39
; set 1st breakpoint, typically on 'main' in C program
Break.Set 1020 /Program
; activate cpu reset
eXception.Activate cpureset on
; start emulation
; release cpu reset
eXception.Activate cpureset off
; check if o.k.
WAIT 0.1s
IF n:STATE.RUN():a:Register(pc)==1020
  PRINT "Startup o.k."

The CONFIG Register does not react on modifications. (68HC11)
Ref: 0026

The CONFIG Register is implemented with EEPROM cells. It can be written anytime in any mode with the mechanism for programming EEPROM. Writing has no immediate effect. The new value gets active with the next reset. See also chapter CONFIG Register Programming in M68HC11 E Series Technical Data Book.
So, for changing the value use the following PRACTICE commands:
   SYStem.CPU SingleTst
   SYStem.Mode AloneInt
   Data.Set EEPROM:103f value
   SYStem.Mode AloneInt
   Data.dump 103f
Then you can see the changed value.

Copyright © 2022 Lauterbach GmbH, Altlaufstr.40, 85635 Höhenkirchen-Siegertsbrunn, Germany   Impressum     Privacy Policy
The information presented is intended to give overview information only.
Changes and technical enhancements or modifications can be made without notice. Report Errors
Last generated/modified: 30-Sep-2022