Korenix | Korenix Library Reference
11
Note 3: More information of Status is given in the data sheet of SJA 1000 in
section 6.4.5 Status Register (SR).
Can_Set_Filter
void Can_Set_Filter(DWORD dwACR, DWORD dwAMR)
This function sets the Acceptance Code and Acceptance Mask of the CAN controller.
The CAN controller must set to reset mode when calling the function.
Note 4: More information of Status is given in the data sheet of SJA 1000 in
section 6.4.15 Acceptance Filter.
Parameters
dwACR
Acceptance Code Register
dwAMR
Acceptance Mask Register
Example
The following example shows the parameter values for
dwACR
and dwAMR in order
to accept only the Data messages of standard frame in the range 110h to 113h.
dwACR:
001 0001 0000
dwAMR:
000 0000 0011
Valid IDs:
001 0001 00xx
ID 110h:
001 0001 0000
ID 111h:
001 0001 0001
ID 112h:
001 0001 0010
ID 113h:
001 0001 0011
So the value of dwACR is 0x221FFFFF and the value of dwAMR is 0x007FFFFF.
StockCheck.com