![Geehy SEMICONDUCTOR APM32F405 Series Скачать руководство пользователя страница 388](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630388.webp)
www.geehy.com Page 387
SPI data register (SPI_DATA) (not used in I2S mode)
Offset address: 0x0C
Reset value: 0x0000
Field
Name
R/W
Description
15:0
DATA
R/W
Transmit Receive Data register
When writing this register, the data will be written to the transmit buffer;
when reading this register, the data in receive buffer will be read.
The size of the buffer is consistent with the length of the data frame, that
is, for 8-bit data, only DATA[7:0] is used when transmitting and receiving
data, and DATA[15:8] is invalid; for 16-bit data, DATA[15:0] will be used
when transmitting and receiving data.
SPI CRC polynomial register (SPI_CRCPOLY) (not used in I2S
mode)
Offset address: 0x10
Reset value: 0x0007
Field
Name
R/W
Description
15:0
CRCPOLY R/W
CRC Polynomial Value Setup
This register contains CRC polynomial of CRC computing, which can be
modified, and the reset value is 0x0007.
SPI receive CRC register (SPI_RXCRC) (not used in I2S mode)
Offset address: 0x14
Reset value: 0x0000
Field
Name
R/W
Description
15:0
RXCRC
R
Receive Data CRC Value
The CRC data of receive data calculated by hardware are stored in this
register; the bits and the length of data frames are consistent, that is, if the
received data are 8 bits, the CRC computing is made based on CRC8; if
the received data are 16 bits, the CRC computing is made based on
CRC16.
When CRCEN is set, the hardware clears the register.
Note: When BSYFLG bit is set to 1, the value of reading RXCRC register
may be wrong.
SPI transmit CRC register (SPI_TXCRC) (not used in I2S mode)
Offset address: 0x18
Reset value: 0x0000
Field
Name
R/W
Description
15:0
TXCRC
R
Transmit Data CRC Value
The CRC data of sent data calculated by hardware are stored in this
register; the bits and the length of data frames are consistent, that is, if the
sent data are 8 bits, the CRC computing is based on CRC8; if the sent data
is are 16 bits, the CRC computing is based on CRC16.
When CRCEN is set, the hardware clears the register.
Note: When BSYFLG bit is set to 1, the value of reading RXCRC register
may be wrong.