In MCx devices, the EEPROM write
procedure (also shown in Figure 2-1) is as follows,
- Stop driving the motor to place
the device in idle/standby state. In MCF devices, motor can be stopped by
writing 0x8000000 to ALGO_DEBUG1 register located at 0xEC. In MCT devices, motor
can be stopped by writing 0x00008000 to DEVICE_CTRL register located at
0xE8.
- Issue a clear fault command to
clear faults, in case the device encountered a fault during motor stop
operation. In MCF devices, faults can be cleared by writing 0x30000000 to
ALGO_CTRL1 register located at 0xEA. In MCT devices, faults can be cleared by
writing 0x30000000 to ALGO_CTRL1 register located at 0xE6.
- Write the required values of the
EEPROM registers to the corresponding shadow/RAM locations between
0x80-0xAE
- Issue an EEPROM write command by
writing 0x8A500000 into ALGO_CTRL1 register (at 0xEA in MCF and 0xE6 in MCT
devices) to write the shadow/RAM registers' (located between 0x000080-0x0000AE)
contents into corresponding EEPROM registers.
- Wait for 750ms after issuing an
EEPROM write command.
- After 750ms, read the ALGO_CTRL1
register value; a read-back value of 0x00000000 indicates that the EEPROM write
is successful.
Note: EEPROM Write Do's and Dont's
- EEPROM write needs to be
issued only when device is in idle state (not driving/powering the
motor)
- Device supply (VM) needs to
be ≥ 6V and all power rails (AVDD, FB_BK and DVDD) needs to stay within the
data sheet specified operating limits throughout the EEPROM write process.
An undervoltage fault on any power rail during the EEPROM write process can
result in incomplete EEPROM write that can cause unexpected device behavior
on subsequent power-up/wake-up.
- TI does not recommend writing
to the EEPROM upon every power-up/wake-up due to aging/write cycle
limitations on number of EEPROM writes. Refer to the device data sheet for
maximum allowed EEPROM write cycles. Repetitive register setting changes can
be done at shadow/RAM locations (and not written to EEPROM); only default
configurations need to be written to EEPROM (at first power-up only).
- After a successful EEPROM
write, a power reset is needed for all the EEPROM setting changes to take
effect.