STM32F1 CAN

Started by tha, January 29, 2021, 09:07:28 AM

Previous topic - Next topic

tha



Bits 31:24 DATA3[7:0]: Data byte 3
Data byte 3 of the message.

Bits 23:16 DATA2[7:0]: Data byte 2
Data byte 2 of the message.

Bits 15:8 DATA1[7:0]: Data byte 1
Data byte 1 of the message.

Bits 7:0 DATA0[7:0]: Data byte 0
Data byte 0 of the message.

A message สามารถบรรจุจาก 0 ถึง 8 data bytes และสตาร์ทด้วย byte 0.

tha



Bits 31:24 DATA7[7:0]: Data byte 7
Data byte 7 of the message.
Note: ถ้า TGT ของ message นี้และ TTCM ทำงาน, DATA7 และ DATA6 จะถูกแทนที่โดย the TIME stamp value.

Bits 23:16 DATA6[7:0]: Data byte 6
Data byte 6 of the message.

Bits 15:8 DATA5[7:0]: Data byte 5
Data byte 5 of the message.

Bits 7:0 DATA4[7:0]: Data byte 4
Data byte 4 of the message.

tha



Bits 31:21 STID[10:0]/EXID[28:18]: Standard identifier or extended identifier
The standard identifier หรือ the MSBs of the extended identifier (ขึ้นอยู่กับ the IDE bit value).

Bits 20:3 EXID[17:0]: Extended identifier
The LSBs of the extended identifier.

Bit 2 IDE: Identifier extension
บิตนี้กำหนด the identifier type ของ message ใน the mailbox.
     0: Standard identifier.
     1: Extended identifier.

Bit 1 RTR: Remote transmission request
     0: Data frame
     1: Remote frame

Bit 0 Reserved, must be kept at reset value.


tha



Bits 31:16 TIME[15:0]: Message time stamp
field นี้บรรจุ the 16-bit timer value ที่ถูกจับที่ the SOF detection.

Bits 15:8 FMI[7:0]: Filter match index
register นี้บรรจุ the index ของ the filter ที่ the message ที่ถูกเก็บใน the mailbox ถูกส่งผ่านเข้ามา. สำหรับรายละเอียดที่มากขึ้นบน identifier filtering อ้างอิงถึง Section 24.7.4

Bits 7:4 Reserved, must be kept at reset value.

Bits 3:0 DLC[3:0]: Data length code
field นี้กำหนดจำนวนของ data bytes ที่ a data frame บรรจุอยู่ ( 0 ถึง 8 ). มันเป็น 0 ในกรณีของการร้องขอ a remote frame.

tha



Bits 31:24 DATA3[7:0]: Data Byte 3
Data byte 3 of the message.

Bits 23:16 DATA2[7:0]: Data Byte 2
Data byte 2 of the message.

Bits 15:8 DATA1[7:0]: Data Byte 1
Data byte 1 of the message.

Bits 7:0 DATA0[7:0]: Data Byte 0
Data byte 0 of the message.
A message สามารถบรรจุจาก 0 ถึง 8 data bytes และสตาร์ทด้วย byte 0.

tha



Bits 31:24 DATA7[7:0]: Data Byte 7
Data byte 3 of the message.

Bits 23:16 DATA6[7:0]: Data Byte 6
Data byte 2 of the message.

Bits 15:8 DATA5[7:0]: Data Byte 5
Data byte 1 of the message.

Bits 7:0 DATA4[7:0]: Data Byte 4
Data byte 0 of the message.

tha



Bits 31:14 Reserved, must be kept at reset value.

Bits 13:8 CAN2SB[5:0]: CAN2 start bank
บิตเหล่านี้ถูกเซ็ตและเคลียร์โดย software. พวกมันกำหนด the start bank สำหรับ the CAN2 interface (Slave) ในย่าน 0 ถึง 27.
Note: เมื่อ CAN2SB[5:0] = 28d, ทุก the filters ไปยัง CAN1 สามารถถูกใช้.
           เมื่อ CAN2SB[5:0] ถูกเซ็ตเป็น 0, ไม่มี filters ถูกกำหนดให้กับ CAN1.

Bits 7:1 Reserved, must be kept at reset value.

Bit 0 FINIT: Filter init mode
Initialization mode for filter banks
     0: Active filters mode.
     1: Initialization mode for the filters

tha



Bits 31:28 Reserved, must be kept at reset value.

Bits 27:0 FBMx: Filter mode
Mode ของ the registers ของ Filter x.
0: Two 32-bit registers of filter bank x อยู่ใน Identifier Mask mode.
1: Two 32-bit registers of filter bank x อยู่ใน Identifier List mode.

Note: Bits 27:14 มีให้ใช้ใน connectivity line devices เท่านั้นและถูกสงวนไว้ถ้าเป็นเบอร์อื่น.