Unlock Microcontroller ST62T20 Locked Memory can be done through manipulate the order/instruction processing sequence, through which requires to know the register of CPU:
The 12-bit length allows the direct addressing of 4096 bytes in Program Space.
However, if the program space contains more than 4096 bytes, the additional memory in program space can be addressed by using the Program ROM Page register.
The PC value is incremented after reading the address of the current instruction. To execute relative jumps, the PC and the offset are shifted through the ALU, where they are added; the result is then shifted back into the PC. The program counter can be changed in the following ways:
– JP (Jump) instruction PC = Jump address
– CALL instruction PC = Call address
– Relative Branch InstructionPC = PC +/- offset
– Interrupt PC = Interrupt vector
– Reset PC = Reset vector
– RET & RETI instructions PC = Pop (stack)
– Normal instruction PC = PC + 1
Flags (C, Z). The ST6 CPU includes three pairs of flags (Carry and Zero), each pair being associated with one of the three normal modes of operation: Normal mode, Interrupt mode and Non Maskable Interrupt mode.
Each pair consists of a CARRY flag and a ZERO flag. One pair (CN, ZN) is used during Normal operation, another pair is used during Interrupt mode (CI, ZI), and a third pair is used in the Non Maskable Interrupt mode (CNMI, ZN- MI) to carry out STMelectronics MCU ST62T03 Code Extraction.
The ST6 CPU uses the pair of flags associated with the current mode: as soon as an interrupt (or a Non Maskable Interrupt) is generated, the ST6 CPU uses the Interrupt flags (or the NMI flags) instead of the Normal flags.
When the RETI instruction is executed, the previously used set of flags is restored. It should be noted that each flag set can only be addressed in its own context (Non Maskable Interrupt, Normal Interrupt or Main routine). The flags are not cleared during context switching and thus retain their status after Unlock Microcontroller ST62T20 Locked Memory.
C : Carry flag.
This bit is set when a carry or a borrow occurs during arithmetic operations; otherwise it is cleared. The Carry flag is also set to the value of the bit tested in a bit test instruction when extract ST62T46 Chip Source; it also participates in the rotate left instruction.
0: No carry has occured 1: A carry has occured
Z : Zero flag
This flag is set if the result of the last arithmetic or logical operation was equal to zero; otherwise it is cleared.
0: The result of the last operation is different from zero
1: The result of the last operation is zero
Switching between the three sets of flags is performed automatically when an NMI, an interrupt or a RETI instruction occurs to copy microcontroller firmware. As NMI mode is automatically selected after the reset of the MCU, the ST6 core uses the NMI flags first.