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

RM0016

Serial peripheral interface (SPI)

 

 

20.4.5SPI data register (SPI_DR)

Address offset: 0x04

Reset value: 0x00

7

6

5

4

3

2

1

0

DR[7:0]

rw

Bits 7:0 DR[7:0]: Data register

Byte received or to be transmitted.

The data register is split into 2 buffers - one for writing (Transmit buffer) and another one for reading (Receive buffer). A write to the data register will write into the Tx buffer and a read from the data register will return the value held in the Rx buffer.

20.4.6SPI CRC polynomial register (SPI_CRCPR)

Address offset: 0x05

Reset value: 0x07

7

6

5

4

3

2

1

0

CRCPOLY[7:0]

rw

Bits 7:0 CRCPOLY[7:0]: CRC polynomial register

This register contains the polynomial for the CRC calculation.

The CRC polynomial (0x07) is the reset value of this register. You can configure an other polynomial as required for your application.

20.4.7SPI Rx CRC register (SPI_RXCRCR)

Address offset: 0x06Reset value: 0x00

7

6

5

4

3

2

1

0

RxCRC[7:0]

r

Bits 7:0 RXCRC[7:0]: Rx CRC Register

When CRC calculation is enabled, the RxCRC[7:0] bits contain the computed CRC value of the subsequently received bytes. This register is reset when the CRCEN bit in SPI_CR2 register 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 an incorrect value.

Doc ID 14587 Rev 9

275/454

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