C509-L_97 SIEMENS [Siemens Semiconductor Group], C509-L_97 Datasheet - Page 38

no-image

C509-L_97

Manufacturer Part Number
C509-L_97
Description
8-Bit CMOS Microcontroller
Manufacturer
SIEMENS [Siemens Semiconductor Group]
Datasheet
3.4.7.1
The bits ESWC and SWC in SFR SYSCON1 are implemented in a way to prevent unintentional
changing of the bits SWAP or PRGEN1. Any changing the bits SWAP or PRGEN1 without using
the ESWC and SWC bits in a special software unlock sequence will have no effect and the above
bits will get back their old values two instruction cycles after being changed.
The following programming steps must be executed at the ESWC/SWC unlock sequence:
1.) First instruction:
2.) Second instruction:
The new chipmode becomes active two instruction cycles after the instruction which sets the bit
SWC (see 2.). These two instruction cycle delay should normally be used for initialization of the
program counter to the 16 bit start-address of the new code memory resource, e.g. with:
If the code memory resource is not changed by the new chipmode there is no need of a new
initialization of the program counter. However the new Chipmode becomes active two instruction
cycles after 2.).
The special software unlock instruction sequence cannot be interrupted by an interrupt request. Any
write or read operation to SFR SYSCON1 will block the interrupt generation for the first cycle of the
directly following instruction.Therefore, the response time of an interrupt request may be
additionally delayed from minimal five instruction cycles up to eight instruction cycles: four or six
instruction cycles for setting ESWC and SWC (depends on the used instructions) and one or two
instruction cycles depending on the instruction used in 3.). When using a one cycle instruction in 3.)
an enabled interrupt may be performed and the interrupt vector address may reside in a “new” code
memory resource due to the new selected Chipmode.
The bits SWAP and PRGEN1 are built up by three shadow latches each. Unintentional changing of
one of this three latches (e.g. by RFI) will have no effect and the former value will be restored in the
next instruction cycle.
Semiconductor Group
Changing the value of the bits SWAP or PRGEN1 with one or more consecutive instructions
simultaneously with setting of bit ESWC:
ANL SYSCON1, #11111X1YB
ORL SYSCON1, #10000X0YB
or:
ORL SYSCON1, #10000X0YB
Setting of bit SWC immediately after 1.) with
ORL SYSCON1, #40H
LJMP 0XXXXH
Special Software Unlock Sequence
; XXXX = 16-bit hex address in new code memory
; clearing of bits PRGEN1 (X=0) and/or SWAP (Y=0)
; setting of ESWC bit with setting of PRGEN1 or SWAP
; e.g. clearing of the SWAP bit:
; setting of the bits PRGEN1 (X=1) and/or SWAP (Y=1) and
; setting the ESWC bit simultaneously
; e.g. setting of the SWAP bit:
;
3-13
ANL SYSCON1,#11111110B
ORL SYSCON1,#10000000B
ORL SYSCON1,#10000001B
Memory Organization
1997-10-01
C509-L

Related parts for C509-L_97