EasyManua.ls Logo

Cmsemicon CMS32L051 - SPI Operating Mode Register (SPIM)

Default Icon
703 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
V1.2.2
CMS32L051 User Manual |Chapter 13 Serial Interface SPI
www.mcu.com.cn 462 / 703
13.3.2 SPI operating mode register (SPIM)
SPIM is used to select the operating mode and control the allow or disallow of the operation.
SPIM can be set by 8-bit storage operation instructions.
A reset signal is generated to clear the register to 00H.
Figure 13-2 Format of mode control register (SPIM)
Address: 0x40042400 After reset: 00HR/W Note 1
symbol
7
6
5
4
3
2
1
0
SPIM
SPIES
TRMD
NSSE
You
INTMD
Dls
SDRIF
SPTF
SPIES
SPI operation enable
0
Stop running.
1
Allow to run.
TRMD
Note3
Transmit/receive mode control
0
Receive mode
1
Transmit /receive mode
NSSE
Note4
NSS pin use selection
0
The NSS pin is not used
1
Use the NSS pin
You
Data transfer order selection
0
Performs MSB-first input/output.
1
Perform LSB- first input/output.
INTMD
Interrupt source selection
0
The end of the transfer is interrupted
1
Null interrupt for sending buffers
Dls
The setting of the data length
0
8-bit data length
1
16-bit data length
SDRIF
Receive buffer non-null flag bits
0
There is no new received valid data in the receive cache
1
There is valid data received in the receive cache. When the register SDRI is read, the bit is
cleared to 0
SPTF Note 2
Communication status flag bits
0
Communication stop
1
Communication is in progress
Note: 1. Bits 0 and 1 are read-only bits.
2. When SPTF=1 (during serial communication), rewriting TRMD, DIR, NSSE is prohibited.
3. The MO or SO output is fixed low when the TRMD is 0.
4. Fix the NSS pin input level to 0 or 1 before setting the bit to 1.

Table of Contents

Related product manuals