Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 6 months ago.
CAN filter always returns 0 (='Failed or Unsupported', mbed LPC1768)
The same question was raised a number of years ago but has not been answered hence I'm hoping this new post will prompt a reply.
Here's the mbed Class Reference:
And here's my code snippet:
The problem is that the function always returns 0.
My understanding is that the hardware applies a valid filter handle when undertaking the read:
Note that I can write, read, set the CAN frequency and use an interrupt for received frames so my problem is only with the filter function. As a workaround I'm using a low-level filter published on the forum but would prefer to use the mbed library if possible.
Thanks, Chris.
1 Answer
6 years, 6 months ago.
Hi Chris, when you look at the source code
Quote:
mbed-os\targets\TARGET_NXP\TARGET_LPC176X\can_api.c
int can_filter(can_t *obj, uint32_t id, uint32_t mask, CANFormat format, int32_t handle) { return 0; // not implemented }