BAT32G1x9 user manual | Chapter 21 Serial interface SPI
832 / 1149
Rev.1.02
21.4.3
Slave sending and receiving
If bits CKS2-0 of the serial clock selection register (n) select slave mode, bit 6 (TRMDn) of the serial
operation mode register (SPIMn) is 1, you enter slave send/receive mode. When a value is written to the
transmit buffer register (SDROn), wait for the clock of the master device to start sending/receiving.
(
1
)
Procedure
Figure 21-14 Initial setup steps for slave send/receive
Note: n=0,1
The start of the
initial setting i
Set the PER1 register
Set the SPICn register
Set the SPIMn register
Set the port
The end of the
initial setting i
Removes the reset state of
the Universal Serial Unit and
begins clock provision
Sets the serial clock
Set the operating mode
Sets the port mode register
Ends initial setup
If you send data to the SDROn
register settings, wait for the
clock of the master device.