
DocID024597 Rev 5
RM0351
Single Wire Protocol Master Interface (SWPMI)
1517
contain the first 3 bytes of the payload (bits [15:8] contain the first byte of the payload, bits
[23:16] the second byte and bits [31:24] the third byte). Then, the following writes to the
SWPMI_TDR register will only contain the following payload data bytes, up to 4 for each
write.
Note:
The low significant byte of the first 32-bit word written into the SWPMI_TDR register is
coding the number of data bytes in the payload. This number could be from 1 to 30. Any
other value in the low significant byte will be ignored and the transmission will not start.
Writing to the SWPMI_TDR register will induce the following actions:
•
Send the transition sequence and 8 idle bits (RESUME by master) if the SWP bus state
is SUPENDED (this will not happen if the SWP bus state is already ACTIVATED),
•
Send a Start of frame (SOF),
•
Send the payload according to the SWPMI_TRD register content. If the number of
bytes in the payload is greater than 3, the SWPMI_TDR needs to be refilled by
software, each time the TXE flag in the SWPMI_ISR register is set, and as long as the
TXBEF flag is not set in the SWPMI_ISR register,
•
Send the 16-bit CRC, automatically calculated by the SWPMI core,
•
Send an End of frame (EOF).
The TXE flag is cleared automatically when the software is writing to the SWPMI_TDR
register.
Once the complete frame is sent, provided that no other frame transmission has been
requested (i.e. SWPMI_TDR has not been written again after the TXBEF flag setting), TCF
and SUSP flags are set in the SWPMI_ISR register 7 idle bits after the EOF transmission,
and an interrupt is generated if TCIE bit is set in the SWPMI_IER register (refer to
Figure 480: SWPMI No software buffer mode transmission
).
Figure 480. SWPMI No software buffer mode transmission
If another frame transmission is requested before the end of the EOF transmission, the TCF
flag is not set and the frame will be consecutive to the previous one, with only one idle bit in
between (refer to
Figure 481: SWPMI No software buffer mode transmission, consecutive
069
62)
(2)
&5&
'
'
'
'
'
'
'
'
6:3RXWSXW
7;(
6:30,B7'5
7;%()
VHWE\+:FOHDUHGE\6:RU'0$
''''
[[['
7&)
VHWE\+:FOHDUHGE\6:
''
'
VHWE\+:FOHDUHGE\6:
6863
6:ZULWHV'
''
LQ6:30,B7'5
6:ZULWHV
''''
LQ6:30,B7'5
6:ZULWHV
[[['
LQ6:30,B7'5
VHWE\+:
,QWHUQDOEXIIHU
''''
[[['
'''