Why is it that when writing to certain R/W registers of Oki’s Advantage Microcontrollers, the write does not take effect?
Descriptive Answer:
Critical Read/Write registers of the Oki’s Advantage Microcontrollers, , have a write protect function that must be properly handled in order to be able to write to these registers. To protect these registers from being erroneously modified by errant programs or by an electro-magnetic shock, the registers require an initial write of a predetermined value before being unlocked to be written with desired value. For example, WDT registers of the MCU are very critical system registers that must not be susceptible to writes by errant programs or electrostatic discharge. Thus, to write these system registers, as specified in the Users Manual of the chip, the application code must first write a values such as 0x3C to unlock the register and then write the desired value to the register. Typically, this write protect method is used on system control registers and WDT control registers.
