cancel
Showing results for 
Search instead for 
Did you mean: 

Stellar Studio CAN Filters

sacha
Associate II

Hi !

We are using an SR5E1E7 with StellarStudio. But we are struggling with CAN filters.

How to setup the CAN device so it can accept any CAN-ID? Or better, how mask work for the CAN Filters ?

We are using CanOpen and we can't really set every ID we want by hand.

Any info is welcome, whether from StellarStudio configuration or C code using `can_set_filter`. 

Currently we only made it to work with one ID:

sacha_0-1743524208706.png

Could you give an example on how to setup filters for:
- Allowing all ID's

- Allowing all ID's from a mask

 

Thanks in advance !

Sacha

1 ACCEPTED SOLUTION

Accepted Solutions
sacha
Associate II

Hi !

It seems to work by using the RX FIFO, Does the CAN MASK is this supposed to work using the DEDICATED BUFFER ?


Using theses filters to enables all ID's (0 is the mask to allow every id's):

`can_set_filter(&can, 0x7FF, 0, CAN_STD_FILTER_TYPE, CAN_FILTER_CLASSIC, CAN_FEC_FIFO0)`

`can_set_filter(&can, 0x1FFFFFF, 0, CAN_XTD_FILTER_TYPE, CAN_FILTER_CLASSIC, CAN_FEC_FIFO0)`

And enabling FIFO buffers:

`can_set_buffers(native_handle, 0, 0, 64, 0, 32, 0)`
 

Sacha

View solution in original post

1 REPLY 1
sacha
Associate II

Hi !

It seems to work by using the RX FIFO, Does the CAN MASK is this supposed to work using the DEDICATED BUFFER ?


Using theses filters to enables all ID's (0 is the mask to allow every id's):

`can_set_filter(&can, 0x7FF, 0, CAN_STD_FILTER_TYPE, CAN_FILTER_CLASSIC, CAN_FEC_FIFO0)`

`can_set_filter(&can, 0x1FFFFFF, 0, CAN_XTD_FILTER_TYPE, CAN_FILTER_CLASSIC, CAN_FEC_FIFO0)`

And enabling FIFO buffers:

`can_set_buffers(native_handle, 0, 0, 64, 0, 32, 0)`
 

Sacha