Single Wire Protocol Master Interface (SWPMI)
Bit 2 RXMODE: Reception buffering mode
Note: This bit cannot be written while SWPACT bit is set.
Bit 1 TXDMA: Transmission DMA enable
Note: TXDMA is automatically cleared if the payload size of the transmitted frame is given as
Bit 0 RXDMA: Reception DMA enable
Buffer mode
RXMODE/TXMODE
RXDMA/TXDMA
44.6.2
SWPMI Bitrate register (SWPMI_BRR)
Address offset: 0x04
Reset value: 0x0000 0001
31
30
29
28
Res.
Res.
Res.
Res.
15
14
13
12
Res.
Res.
Res.
Res.
Bits 31:6 Reserved, must be kept at reset value
Bits 5:0 BR[5:0]: Bitrate prescaler
This field must be programmed to set SWP bus bitrate, taking into account the F
programmed in the RCC (Reset and Clock Control), according to the following formula:
F
SWP
Note: The programmed bitrate must stay within the following range: from 100 kbit/s up to
1510/1830
This bit is used to choose the reception buffering mode. This bit is relevant only when
TXDMA bit is set (refer to
0: SWPMI is configured in Single software buffer mode for reception
1: SWPMI is configured in Multi software buffer mode for reception.
This bit is used to enable the DMA mode in transmission
0: DMA is disabled for transmission
1: DMA is enabled for transmission
0x00 (in the least significant byte of TDR for the first word of a frame). TXDMA is also
automatically cleared on underrun events (when TXUNRF flag is set in the SWP_ISR
register)
This bit is used to enable the DMA mode in reception
0: DMA is disabled for reception
1: DMA is enabled for reception
Table 262. Buffer modes selection for transmission/reception
No software buffer
27
26
25
Res.
Res.
Res.
11
10
9
Res.
Res.
Res.
= F
/ ((BR[5:0]+1)x4)
SWPCLK
2 Mbit/s.
BR[5:0] cannot be written while SWPACT bit is set in the SWPMI_CR register.
Table 262: Buffer modes selection for
Single software buffer
x
0
24
23
22
Res.
Res.
Res.
8
7
6
Res.
Res.
Res.
DocID024597 Rev 5
transmission/reception).
Multi software buffer
0
1
21
20
19
18
Res.
Res.
Res.
Res.
5
4
3
2
BR[5:0]
rw
rw
rw
rw
RM0351
1
1
17
16
Res.
Res.
1
0
rw
rw
SWPCLK
Need help?
Do you have a question about the STM32L4 5 Series and is the answer not in the manual?