STPM01_11 STMICROELECTRONICS [STMicroelectronics], STPM01_11 Datasheet - Page 43

no-image

STPM01_11

Manufacturer Part Number
STPM01_11
Description
Programmable single phase energy metering IC with tamper detection
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
STPM01
The same procedure should be applied for the mode signals, but in this case the 6-bits
address must be taken from the
The LSB of command is also called EXE bit because instead of data bit value, the
corresponding serial clock pulse is used to generate the necessary latching signal. This way
the writing mechanism does not need the measurement clock in order to operate, which
makes the operation of SPI module of STPM01 completely independent from the rest of
device logic except from the signal POR.
Commands for changing system signals should be sent during active signals SCS and SYN
as it is shown in the
driver of STPM01 and make the SDATD as an input pin. A string of commands can be send
within one period of active signals SCS and SYN or command can be followed by reading
the data record but, in this case, the SYN should be deactivated in order to enable SDATD
output driver and a SYN pulse should be applied before activation of SCS in order to latch
the data.
Interfacing the standard 3-wire SPI with STPM01 SPI.
Due to the fact a 2-wire SPI is implemented in STPM01 it is clear that sending any
command from a standard 3-wire SPI would require 3-wire to 2-wire interface, which should
produce a proper signal on SDATD from host signals SDI, SDO and SYN. A single gate 3-
state buffer could be omitted by an emulation of SPI just to send some command. On a
microcontroller this would be done by the following steps:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10. enable the SPI module;
In case of precharge command (0xFF), emulation above is not necessary. Due to the pull up
device on the SDATD pin of the STPM01 the processor needs to perform the following
steps:
disable the SPI module;
set SDI pin which is connected to SDATD to be output;
activate SYN first and then SCS;
apply new bit value to SDI and activate SCL;
deactivate SCL;
repeat the last two steps seven times to complete one byte transfer;
repeat the last three steps for any remaining byte transfer;
set SDI pin to be input;
deactivate SCS and the SYN;
t
t
t
t
t
t
t
t
t
t
1
2
3
4
3
3
5
6
8
9
: data value is placed in SDA
: SDA value is stable and shifted into the device
: end of SPI writing
: SPI enters idle state
→ t
→ t
→ t
→ t
→ t
→ t
2
3
5
5
6
7
: 1 bit data value
: 6 bits address of the destination latch
: 1 bit EXE command
(> 30 ns): SPI enabled for write operation
(> 10 µs): writing clock period
(> 30 ns): SPI out of idle state
Figure
27. The SYN must be put low in order to disable SDATD output
Doc ID 10853 Rev 8
Table
17.
Theory of operation
43/60

Related parts for STPM01_11