I-7188XBD-CAN/μPAC-7186EXD-CAN user manual (ver.1.0.3, May/09/2014)
24
For 11-bit ID Message:
Register
bits of register
Filter Target
AccCode[0] and AccMask[0]
bit7~bit0
bit10 ~ bit3 of ID
AccCode[1] and AccMask[1]
bit7~bit5
bit2 ~ bit0 of ID
AccCode[1] and AccMask[1]
bit4
RTR
AccCode[1] and AccMask[1]
bit3~bit0
no use
AccCode[2] and AccMask[2]
bit7~bit0
bit7 ~ bit0 of 1st byte data
AccCode[3] and AccMask[3]
bit7~bit0
bit7 ~ bit0 of 2nd byte data
For 29-bit ID Message:
Register
bits of register
Filter Target
AccCode[0] and AccMask[0]
bit7~bit0
bit28 ~ bit21 of ID
AccCode[1] and AccMask[1]
bit7~bit0
bit20 ~ bit13 of ID
AccCode[2] and AccMask[2]
bit7~bit0
bit12 ~ bit5 of ID
AccCode[3] and AccMask[3]
bit7~bit3
bit4 ~ bit0 of ID
AccCode[3] and AccMask[3]
bit2
RTR
AccCode[3] and AccMask[3]
bit1~bit0
no use
Note: 1. AccCode[0] means the most significant byte of AccCode and
AccCode[3] means the least significant byte of AccCode.
2. AccMask[0] means the most significant byte of AccMask and
AccMask[3] means the least significant byte of AccMask.
3. Bit10 is most significant bit and Bit0 is least significant bi
t
For example (In 29 bit ID message):
AccCode
:
00h 00h 00h
A0h
AccMask
:
FFh FFh FFh
1Fh
ID Value
:
??
??
??
Ah and Bh
will be accepted. (??: don't care)
(Note: The mark “h” behind the value means hex format.)
Return:
CAN_NoError: OK
CAN_BaudNotSupport: This CAN baud rate is not support.
CAN_ResetError: Fail to reset the CAN controller.
CAN_ConfigError: Fail to configure the CAN controller register.
CAN_SetACRError: Fail to set the AccCode register
CAN_SetAMRError: Fail to set the AccCode register
CAN_NotEnoughMemory: Create a reception/transmission software
buffer for CAN messages are fail.
CAN_TypeOf7188Error: The type of the 7188 is not defined of this
library.
Relative function:
None