Hello,
kef wrote:
On S12 devices FPROT register is writeable at runtime. It is made so that you can write protect more than already protected and can't remove write protection from already protected memory. NVPROT byte in flash defines reset-default value of FPROT register.
On S08D FPROT register is not writeable at all. You can only program NVPROT byte, which can be done only once at runtime, since minimum level of flash write protection will write protect NVPROT byte. Of course you can keep flash not write protected, then you may change EEPROM protection as many times as you wish. Yes, you must rest to apply new protection setting.
Here is an extract from the 'DZ60 datasheet -
4.5.11.4 Flash and EEPROM Protection Register (FPROT and NVPROT)
.
The FPROT register defines which Flash and EEPROM sectors are protected against program and erase
operations.
During the reset sequence, the FPROT register is loaded from the nonvolatile location NVPROT. To
change the protection that will be loaded during the reset sequence, the sector containing NVPROT must
be unprotected and erased, then NVPROT can be reprogrammed.
FPROT bits are readable at any time and writable as long as the size of the protected region is being
increased. Any write to FPROT that attempts to decrease the size of the protected memory will be ignored.
.
It would seem that the 'DZ60 may operate similarly to the S12 devices, in this respect. Maybe a new FPROT setting could be stored in EEPROM, and then written to FPROT register during the user program initialisation process, following each reset.
Regards,
Mac