CY8C9520A
CY8C9540A
CY8C9560A
Document Number: 38-12036 Rev. *I Page 14 of 32
Watchdog Register (2Fh)
This register controls the internal Watchdog timer. This timer can
trigger a device reset if the device is not responding to I
2
C
requests due to misconfiguration. Device operation is not
affected when the Watchdog register = 0. If the I
2
C master writes
any non zero value to the Watchdog register, the countdown
mechanism is activated and each second the register is
decremented. Upon transition from 1 to 0, the device is rebooted,
which restores user defaults. After reboot, the Watchdog register
value is reset to zero. Any I
2
C transaction (addressing the
Expander) resets the Watchdog register to the previously stored
value. Any device reboot (caused by a POR or Watchdog) sets
the Watchdog register to zero (turns off the Watchdog feature).
The Watchdog timer can be disabled by writing zero to the
Watchdog register (2Fh) or by using the Reconfigure Device
Cmd (07h).
Note The Watchdog timer is not intended to track precise time
intervals. The timer's frequency can vary in range between –50%
on up to +100%. This variation must be taken into account when
selecting the appropriate value for the Watchdog register.
Command Register (30h)
This register sends commands to the device, including current
configuration as new POR defaults, restore factory defaults,
define POR defaults, read POR defaults, write device
configuration, read device configuration, and reconfigure device
with stored POR defaults. The command set is presented in
Table 14.
Note Registers are not restored in parallel. Do not assume any
particular order to the restoration process.
Commands Description
Store Config to E
2
POR Defaults Cmd (01h)
The current ports settings (drive modes and output data) and
other configuration registers are saved in the EEPROM by using
the store configuration command (Cmd). These settings are
automatically loaded after the next device power up or if the 07h
command is issued.
Restore Factory Defaults Cmd (02h)
This command replaces the saved user configuration with the
factory default configuration. Current settings are unaffected by
this command. New settings are loaded after the next device
power up or if the 07h command is issued.
Write E
2
POR Defaults Cmd (03h)
This command sends new power up defaults to the CY8C95xx
without changing current settings unless the 07h command is
issued afterwards. This command is followed by 147 data bytes
according to Table 15. The CRC is calculated as the XOR of the
146 data bytes (00h-91h). If the CRC check fails or an
incomplete block is sent, then the slave responds with a NAK and
the data does not get saved to EEPROM.
To define new POR defaults the user must:
■ Write command 03h
■ Write 146 data bytes with new values of registers
■ Write 1 CRC byte calculated as XOR of previous 146 data
bytes.
Content of the data block is described in Ta ble 15.
Table 14. Available Commands
Command Description
01h Store device configuration to EEPROM POR
defaults
02h Restore Factory Defaults
03h Write EEPROM POR defaults
04h Read EEPROM POR defaults
05h Write device configuration
06h Read device configuration
07h Reconfigure device with stored POR defaults
Table 15. POR Defaults Data Structure
Offset Value
00h–07h Output Port 0–7
08h–0Fh Interrupt mask Port 0–7
10h–17h Select PWM Port 0–7
18h–1Fh Inversion Port 0–7
20h–27h Pin Direction Port 0–7
28h Resistive pull up Drive Mode Port 0
29h Resistive pull down Drive Mode Port 0
2Ah Open drain high Drive Mode Port 0
2Bh Open drain low Drive Mode Port 0
2Ch Strong drive Drive Mode Port 0
2Dh Slow strong drive Drive Mode Port 0
2Eh High impedance Drive Mode Port 0
2Fh–35h Drive Modes Port 1
36h–3Ch Drive Modes Port 2
3Dh–43h Drive Modes Port 3
44h–4Ah Drive Modes Port 4
4Bh–51h Drive Modes Port 5
52h–58h Drive Modes Port 6
59h–5Fh Drive Modes Port 7
60h Config setting PWM0
61h Period setting PWM0
62h Pulse Width setting PWM0
63h–65h PWM1 settings
……
8Dh–8Fh PWM15 settings
90h Divider
91h Enable
92h CRC