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

Controller area network (beCAN)

RM0016

 

 

23.6.4Message storage

The interface between the software and the hardware for the CAN messages is implemented by means of mailboxes. A mailbox contains all information related to a message; identifier, data, control, status and time stamp information.

Transmit mailbox

The software sets up the message to be transmitted in an empty transmit mailbox. The status of the transmission is indicated by hardware in the CAN_MCSR register.

Table 66. Transmit mailbox mapping

Offset to Transmit Mailbox base

Register name

address (bytes)

 

 

 

0

CAN_MCSR

 

 

1

CAN_MDLCR

 

 

2

CAN_MIDR1

 

 

3

CAN_MIDR2

 

 

4

CAN_MIDR3

 

 

5

CAN_MIDR4

 

 

6

CAN_MDAR1

 

 

7

CAN_MDAR2

 

 

8

CAN_MDAR3

 

 

9

CAN_MDAR4

 

 

10

CAN_MDAR5

 

 

11

CAN_MDAR6

 

 

12

CAN_MDAR7

 

 

13

CAN_MDAR8

 

 

14

CAN_MTSRL

 

 

15

CAN_MTSRH

 

 

380/454

Doc ID 14587 Rev 9

RM0016

Controller area network (beCAN)

 

 

Receive mailbox

When a message has been received, it is available to the software in the FIFO output mailbox. Once the software has handled the message (e.g. read it) the software must release the FIFO output mailbox by means of the RFOM bit in the CAN_RFR register to make the next incoming message available. The filter match index is stored in the CAN_MFMIR register. The 16-bit time stamp value is stored in the CAN_MTSRH and CAN_MTSRL registers.

Table 67. Receive mailbox mapping

Offset to Receive Mailbox base

Register name

address (bytes)

 

 

 

0

CAN_MFMIR

 

 

1

CAN_MDLCR

 

 

2

CAN_MIDR1

 

 

3

CAN_MIDR2

 

 

4

CAN_MIDR3

 

 

5

CAN_MIDR4

 

 

6

CAN_MDAR1

 

 

7

CAN_MDAR2

 

 

8

CAN_MDAR3

 

 

9

CAN_MDAR4

 

 

10

CAN_MDAR5

 

 

11

CAN_MDAR6

 

 

12

CAN_MDAR7

 

 

13

CAN_MDAR8

 

 

14

CAN_MTSRL

 

 

15

CAN_MTSRH

 

 

Doc ID 14587 Rev 9

381/454

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