DocID14024 Rev 4 13/39
UM0470 Single wire interface module (SWIM)
38
3.4 SWIM communication protocol
When in SWIM is in ACTIVE mode, the communication can be initiated either by the host or
by the device. Each byte or command is preceded by a 1-bit header in order to arbitrate if
both host and device initiate the communication at the same time.
The host header is ‘0’ in order to have the priority over the device in case of arbitration, due
to open-drain capability. The host can start the transfer only if there is no transfer ongoing.
Figure 8. Command format (host -> target)
Each command sent by the host is made of:
• 1 command (ROTF, WOTF or SWRST) made of:
Header: 1 bit at ‘0’
b2-b0: 3-bit command
pb: parity bit: XOR between all b(i)
ack:acknowledge (1 bit at ‘1’). The receiver must send the not-acknowledge
value if it has detected a parity error (NACK: not acknowledge = 1 bit at ‘0’),
or it is not yet ready.
• optionally several data packets (in case of WOTF) made of:
Header: 1 bit at ‘0’
b7-b0: 8-bit data
pb: parity bit sent after data. XOR between all b(i)
ack: acknowledge
Figure 9. Data format (target -> host)
Each data frame is made of:
Header: 1 bit at ‘1’
b7-b0: 8-bit data
pb: parity bit sent after data
ack: acknowledge
06Y9
E E E SE DFN E E E E E E E E SE DFN
&RPPDQG 'DWD
,WDOLFXQGHUOLQHG
%ROG
%LWVHQWE\WKHKRVW
%LWVHQWE\WKHGHYLFH
06Y9
EEEEEEEESEDFN
'DWDQ 'DWD
,WDOLFXQGHUOLQHG
%ROG
%LWVHQWE\WKHKRVW
%LWVHQWE\WKHGHYLFH
'DWDQ