3 years, 9 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

3 years, 9 months ago.

Hi Chris, when you look at the source code



int can_filter(can_t *obj, uint32_t id, uint32_t mask, CANFormat format, int32_t handle) {
    return 0; // not implemented

Accepted Answer

That explains it, thanks Pavel.

posted by Chris Mabey 21 Oct 2017