Locked ST62T09 Heximal Cloning

In cases where some data which are necessary for Locked ST62T09 Heximal Cloning (look-up tables for example) are stored in program memory, reading these data requires the use of the Data ROM window mechanism. To do this:

The DRWR register has to be loaded with the 64-byte block number where the data are located (in program memory). This number also gives the start address of the

Then, the offset address of the byte in the Data ROM Window (corresponding to the offset in the 64-byte block in program memory) has to be loaded in a register (A, X,…).

Locked ST62T09 Heximal Cloning

Locked ST62T09 Heximal Cloning

When the above two steps are completed, the data can be read.

To understand how to determine the DRWR and the content of the register, please refer to the example shown in below Figure. In any case the calculation is automatically handled by the ST6 development tools.

data address in program memory

data address in program memory

Please refer to the user manual of the corresponding tool.

Care is required when handling the DRWR register as it is write only. For this reason, the DRWR contents should not be changed while executing an interrupt service routine, as the service routine cannot save and then restore the register’s previous contents.

If it is impossible to avoid writing to the DRWR during the interrupt service routine, an image of the register must be saved in a RAM location, and each time the program writes to the DRWR, it must also write to the image register. The image register must be written first so that, if an interrupt occurs between the two instructions, the DRWR is not affected.