Question
STM32f105 double CAN receiv problem
on stm32f105 launched CAN. With the transfer of messages, there were no questions, but there were questions about receiving messages from two CAN.
the code is responsible for processing the message
void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan)
{
HAL_CAN_GetRxMessage(&hcan2, CAN_RX_FIFO0, &RxHeader, RxData);
HAL_CAN_GetRxMessage(&hcan1, CAN_RX_FIFO0, &RxHeader, RxData);
HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_15);
}but this code works both on the message from can1, and on messages from can2.
As a result, I do not understand from which of the kans this message came.
How to divide, what would be separately messages from can1 and can2?
