Issue receiving CAN Frames
Hello ST community,
I am currently programming an ECU system, using f446re nucleo board. Right now i am trying to communicate with BMS using CAN communication.
So far, everything has been set: CAN Initialization and start, sending works properly.
The issue i am facing is that i cannot receive frames from battery, even though i can communicate with laptop for UDS protocole (Reception works properly in that case), but when i try with the battery, the debug mode doesn't stop at the rx interrupt routine.
I have verified the CANFilter configuration to make sure, i didn't see any mistake, nothing has been changed but i only can communicate with UDS frames and not with batteries.
for example: frame ID 0x586 entering fifo0 with such a filter:
void CAN_Filter_FIFO0(CAN_HandleTypeDef* hcan)
{
CAN_FilterTypeDef canfilterconfig;
canfilterconfig.FilterActivation = CAN_FILTER_ENABLE;
canfilterconfig.FilterBank = 10;
canfilterconfig.FilterFIFOAssignment = CAN_FILTER_FIFO0;
canfilterconfig.FilterIdHigh = 0x580 << 5; // According to the DBC
canfilterconfig.FilterIdLow = 0x0000;
canfilterconfig.FilterMaskIdHigh = 0xfe0<<5;// Calculation of the mask according to the DBC
canfilterconfig.FilterMaskIdLow = 0x0000;
canfilterconfig.FilterMode = CAN_FILTERMODE_IDMASK;
canfilterconfig.FilterScale = CAN_FILTERSCALE_32BIT;
canfilterconfig.SlaveStartFilterBank = 13;
HAL_CAN_ConfigFilter(hcan, &canfilterconfig);
}Please let me know if anyone has any idea.
