90E21/22/23/24 SINGLE-PHASE HIGH-PERFORMANCE WIDE-SPAN ENERGY METERING IC
Interface 18 April 2, 2013
4.1.3 TIMEOUT AND PROTECTION
Timeout occurs if SCLK does not toggle for 6ms in both four-wire and
three-wire modes. When timeout, the read or write operation is aborted.
If there are more than 24 SCLK cycles when CS is driven low in four-
wire mode or between two starts in three-wire mode, writing operation is
prohibited while normal reading operation can be completed by taking
the first 24 SCLK cycles as the valid ones. However, the reading result
might not be the intended one.
A read access to an invalid address returns all zero. A write access
to an invalid address is discarded.
Table-9 and Table-10 list the read or write result in different condi-
tions.
4.2 WARNOUT PIN FOR FATAL ERROR WARNING
Fatal error warning is raised through the WarnOut pin in two cases:
checksum calibration error and voltage sag.
Calibration Error
The 90E21/22/23/24 performs diagnosis on a regular basis for impor-
tant parameters such as calibration parameters and metering configura-
tion. When checksum is not correct, the CalErr[1:0] bits (SysStatus,
01H) are set, and both the WarnOut pin and the IRQ pin are asserted.
When checksum is not correct, the metering part does not work to pre-
vent a large number of pulses during power-on or any abnormal situa-
tion upon incorrect parameters.
Voltage Sag
Voltage sag is detected when voltage is continuously below the volt-
age sag threshold for one cycle which starts from any zero-crossing
point. Voltage threshold is configured by the SagTh register (03H). Refer
to section 6.5.
When voltage sag occurs, the SagWarn bit (SysStatus, 01H) is set
and the WarnOut pin is asserted if the FuncEn register (02H) enables
voltage sag warning through the WarnOut pin. This function helps
reduce power-down detection circuit in system design. In addition, the
method of judging voltage sag by detecting AC side voltage eliminates
the influence of large capacitor in traditional rectifier circuit, and can
detect voltage sag earlier.
4.3 LOW COST IMPLEMENTATION IN ISOLATION
WITH MCU
The following functions can be achieved at low cost when the 90E21/
22/23/24 is isolated from the MCU:
SPI: MCU can perform read and write operations through low speed
optocoupler (e.g. NEC2501) when the 90E21/22/23/24 is isolated from
the MCU. The SPI interface can be of 3-wire or 4-wire.
Energy Pulses CFx: Energy can be accumulated by reading values
in corresponding energy registers. CFx can also connect to the optocou-
pler and the energy pulse light can be turned on by CFx.
Fatal Error WarnOut: Fatal error can be acquired by reading the CalE
rr[1:0] bits (SysStatus, 01H).
IRQ: IRQ interrupt can be acquired by reading the SysStatus register
(01H).
Reset: The 90E21/22/23/24 is reset when ‘789AH’ is written to the
software reset register (SoftReset, 00H).
Table-9 Read / Write Result in Four-Wire Mode
Condition Result
Operation Timeout SCLK Cycles
note 1
Read/Write
Status
LastSPIData
Register Update
Read
-
note 2
>=24 Normal Read Yes
-
note 2
<24 Partial Read No
Write
No =24 Normal Write Yes
No !=24 No Write No
Yes - No Write No
Note 1: The number of SCLK cycles when CS is driven low or the number of
SCLK cycles before timeout if any.
Note 2: '-' stands for Don't Care.
Table-10 Read / Write Result in Three-Wire Mode
Condition Result
Operation Timeout SCLK Cycles
note 1
Read/Write
Status
LastSPIData
Register Update
Read
No >=24
note 2
Normal Read Yes
Timeout after
24 cycles >24 Normal Read Yes
Timeout
before 24
cycles -
note 3
Partial Read No
Timeout at 24
cycles =24 Normal Read Yes
Write
No =24 Normal Write Yes
No !=24 No Write No
Yes - No Write No
Note 1: The number of SCLK cycles between 2 starts or the number of SCLK
cycles before timeout if any.
Note 2: There is no such case of less than 24 SCLK cycles when there is no
timeout in three-wire mode, because the first few SCLK cycles in the next oper-
ation is counted into this operation. In this case, data is corrupted.
Note 3: '-' stands for Don't Care.