Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
162
Добавлен:
01.03.2016
Размер:
3.56 Mб
Скачать

Serial peripheral interface (SPI)

RM0016

 

 

20.4.8SPI Tx CRC register (SPI_TXCRCR)

Address offset: 0x07Reset value: 0x00

7

6

5

4

3

2

1

0

TxCRC[7:0]

r

Bits 7:0 TxCRC[7:0]: Tx CRC register

When CRC calculation is enabled, the TxCRC[7:0] bits contain the computed CRC value of the subsequently transmitted bytes. This register is reset when the CRCEN bit of SPI_CR2 is written to 1. The CRC is calculated serially using the polynomial programmed in the SPI_CRCPR register.

Note: A read to this register when the BSY flag is set could return a incorrect value

20.5SPI register map and reset values

Table 47.

SPI register map and reset values

 

 

 

 

 

Address

Register

7

6

5

4

3

2

1

0

offset

name

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SPI_CR1

LSB

SPE

BR2

BR1

BR1

MSTR

CPOL

CPHA

0x00

FIRST

reset value

0

0

0

0

0

0

0

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0x01

SPI_CR2

BDM

BDOE

CRCEN

CRCNEXT

-

RXONLY

SSM

SSI

reset value

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

0x02

SPI_ICR

TXIE

RXIE

ERRIE

WKIE

-

-

 

 

reset value

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

0x03

SPI_SR

BSY

OVR

MODF

CRCERR

WKUP

-

TXE

RXNE

reset value

0

0

0

0

0

0

1

0

 

 

 

 

 

 

 

 

 

 

 

0x04

SPI_DR

MSB

-

-

-

-

-

-

LSB

reset value

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

0x05

SPI_CRCPR

MSB

-

-

-

-

-

-

LSB

reset value

0

0

0

0

0

1

1

1

 

 

 

 

 

 

 

 

 

 

 

0x06

SPI_RXCRCR

MSB

-

-

-

-

-

-

LSB

reset value

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

0x07

SPI_TXCRCR

MSB

-

-

-

-

-

-

LSB

reset value

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

276/454

Doc ID 14587 Rev 9

Соседние файлы в папке Минимум документации STM8_1