Datasheet

Theory of operation STPM10
38/53 Doc ID 17728 Rev 4
t
1
t
2
(> 30 ns): SPI out of idle state
t
2
t
3
(> 30 ns): SPI enabled for write operation
t
3
: data value is placed in SDA
t
4
: SDA value is stable and shifted into the device
t
3
t
5
(> 10 µs): writing clock period
t
3
t
5
: 1 bit data value
t
5
t
6
: 6 bit address of the destination latch
t
6
t
7
: 1 bit EXE command
t
8
: end of SPI writing
t
9
: SPI enters idle state
The same procedure should be applied for the mode signals, but in this case the 6-bit
address must be taken from Tabl e 12 .
The LSB of the command is also called the EXE bit because instead of the 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 STPM10 completely independent from the rest of
device logic except for the signal POR.
Commands for changing system signals should be sent during active signals SCS and SYN,
as shown in Figure 25. The SYN must be put low in order to disable the SDA output driver of
the STPM10 and make the SDA an input pin. A string of commands can be sent within one
period of active SCS and SYN signals, or a command can be followed by reading the data
record. However, in this case, the SYN should be deactivated in order to enable the SDA
output driver, and a SYN pulse should be applied before activation of the SCS in order to
latch the data.
7.22.1 Interfacing the standard 3-wire SPI with the STPM10 SPI
Due to the fact that a 2-wire SPI is implemented in the STPM10, it is clear that sending any
command from a standard 3-wire SPI would require a 3-wire to 2-wire interface, which
should produce a proper signal on SDA from host signals SDI, SDO and SYN. The need for
a single-gate 3-state buffer could be avoided through an emulation of SPI just to send some
commands. On a microcontroller this would be done by performing the following steps:
1. Disable the SPI module
2. Set the SDI pin, which is connected to SDA as an output
3. Activate SYN first, and then SCS
4. Apply a new bit value to SDI, and activate SCL
5. Deactivate SCL
6. Repeat the previous two steps seven times to complete a one byte transfer
7. Repeat the previous three steps for any remaining byte transfers
8. Set the SDI pin as an input
9. Deactivate SCS and SYN
10. Enable the SPI module