![Cmsemicon BAT32G1 9 Series Скачать руководство пользователя страница 826](http://html1.mh-extra.com/html/cmsemicon/bat32g1-9-series/bat32g1-9-series_user-manual_2627609826.webp)
BAT32G1x9 user manual | Chapter 21 Serial interface SPI
826 / 1149
Rev.1.02
21.4.1
The sending and receiving of the master
If the serial operating mode register (SPIMn) has bit 6 (TRMDn) of 1, data can be sent or received. When
a value is written to the transmit buffer register (SDROn), send/receive starts.
(
1
)
Procedure
Figure 21-7
Initial setup steps for master 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 set up data to send to the
SDROn register,
communication begins