Hi ,
The following is the API definition:
LDD_TError CAN_SetAcceptanceMask(LDD_TDeviceData *DeviceDataPtr, LDD_CAN_TMBIndex BufferIdx, LDD_CAN_TAccMask AccMask);
and below is some description for parameters as well as the return value.
| ** | @param |
| ** | DeviceDataPtr - Device data structure |
| ** | pointer returned by [Init] method. |
| ** | @param |
| ** | BufferIdx | - Index for Acceptance Mask |
| ** | Message Buffer. |
| ** | @param |
| ** | AccMask | - 11-bit Mask could be selected for |
| ** | a standard frame or 29-bit for an extended |
| ** | frame. |
| ** | @return |
| ** | - Error code, possible codes: |
| ** | ERR_OK - OK |
| ** | ERR_SPEED - This device does not work in |
| ** | the active clock configuration |
| ** | ERR_PARAM_RANGE - Value of buffer index is |
| ** | out of range. |
| ** | ERR_NOTAVAIL - Acceptance mask isn't |
| ** | possible change when CAN component is |
| ** | running, component must be disabled or |
| ** | switched to freeze mode. |
So maybe you call this API when CAN is running, please disable it or put it into freeze mode before calling this function.
Hope that helps,
B.R
Kan