4 years, 9 months ago.

CAN API Filtering

Hi Folks,

I'm implementing the CAN acceptance filtering stuffs for LPC1768 and was just wondering why the HAL CAN API (can_api.h) does not provide something to remove IDs. You can obviously add IDs with can_filter() but nothing to remove IDs. Did I miss something about how to use can_filter() function?

Thanks in advance.

Clément

As far as I know, the can_filter() for LPC1768 is not implemented yet.
https://github.com/mbedmicro/mbed/blob/master/libraries/mbed/targets/hal/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
}
posted by Yoshi Mimura 10 Oct 2015

Sir, thanks for the reply. It's because it's not implemented yet that i did the implementation myself eheh :) But my question was more on the HAL. I was wondering why it does not offer something to remove IDs that have been added through can_filter() function. To me (and to my application point of view) this is really something missing. regards Clement

posted by Clément BENOIT 24 Oct 2015

Mr Clement Have you posted a CAN Id Filter, if not is that code available? Thanks, Louis

posted by Louis Ashford 30 Jun 2016
Be the first to answer this question.