Hi,
Concerning CAN objects that can have multiple filters assigned...
The following CMSIS structure tells the application about the filtering capabilities of each object. It is returned in the ARM_CAN_ObjectGetCapabilities() call. Is the "multiple_filters" element a ONE/ZERO to indicate this capability or is it numeric that says how many filters can be assigned. If the former, how do I tell how many?
Thanks
typedef struct _SPI_CAN_Obj_Capabilities { uint32_t tx : 1; /* Object supports transmission */ uint32_t rx : 1; /* Object supports reception */ uint32_t rx_rtr_tx_data : 1; /* RTR reception auto data transfer */ uint32_t tx_rtr_rx_data : 1; /* RTR transmission auto data reception */ uint32_t multiple_filters : 1; /* Object allows assignment of multiple filters to it */ uint32_t exact_filtering : 1; /* Object supports exact identifier filtering */ uint32_t range_filtering : 1; /* Object supports range identifier filtering */ uint32_t mask_filtering : 1; /* Object supports mask identifier filtering */ uint32_t message_depth : 1; /* Number of messages buffers (FIFO) for that object */ }SPI_CAN_Obj_Capabilities;
I previewed and edited this post so the structure would appear readable, but unfortunately it still died in the posting...
That's likely due to you not reading/digesting the posting instructions. You need to embed code in between <pre> and </pre> tags.
Yup, my bad... I saw the bold and Italics stuff and tuned out the rest.
You can't get absolute number of available filters through API, you can either look into driver code and find this out for your particular driver as this is compile time constant and does not change during runtime, or you can at runtime assign filters until you get error code when you try to set filter.
Thanks...
sounds reasonable. And it is only done in configuration so adding till error seems to be a good way to go for us.
Tony