I can configure CAN filters from main.c file, but I want also to configure them by sending frame from the other node. It's that even possible to configure CAN filters while STM is working? There is the code from interrupt to configure filters:
sFilterConfig.FilterMode = CAN_FILTERMODE_IDLIST;
sFilterConfig.FilterScale = CAN_FILTERSCALE_32BIT;
sFilterConfig.BankNumber = hcan.pRxMsg->Data;
sFilterConfig.FilterNumber = hcan.pRxMsg->Data;
sFilterConfig.FilterIdHigh = (hcan.pRxMsg->Data)<<5;
sFilterConfig.FilterIdLow = 0;
sFilterConfig.FilterMaskIdHigh = 0;
sFilterConfig.FilterMaskIdLow = 0;
sFilterConfig.FilterFIFOAssignment = 0;
sFilterConfig.FilterActivation = ENABLE;
For example I am sending Data = 1, Data=0.
When I'am sending the frame, the LED changes it's state, so it should work. I used analogous code in main.c file to configure filter while programming STM. It's possible to solve this?
Update: I can configure them from interrupt but in filter mask mode. So the issue is how to configure them in ID list mode.