Solved
How to read CAN BUS with STM32F091RC + MCP2551 transreceiver?
Hi I am trying to read car CAN BUS with STM32F091RC + MCP2551 transreceiver. All I am getting is empty header and data. I guess my setup is incorrect, anyone can advice how to setup?
This is my setup:

CAN_TxHeaderTypeDef TxHeader;
CAN_RxHeaderTypeDef RxHeader;
uint8_t TxData[8];
uint8_t RxData[8];
uint32_t TxMailbox;
HAL_CAN_Start(&hcan);
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* Get RX message */
if (HAL_CAN_GetRxMessage(&hcan, CAN_RX_FIFO0, &RxHeader, RxData) != HAL_OK)
{
/* Reception Error */
Error_Handler();
}
if (
RxData[0] != 0 ||
RxData[1] != 0 ||
RxData[2] != 0 ||
RxData[3] != 0 ||
RxData[4] != 0 ||
RxData[5] != 0 ||
RxData[6] != 0 ||
RxData[7] != 0 ||
RxHeader.DLC != 0 ||
RxHeader.ExtId != 0 ||
RxHeader.FilterMatchIndex != 0 ||
RxHeader.IDE != 0 ||
RxHeader.RTR != 0 ||
RxHeader.StdId != 0 ||
RxHeader.Timestamp != 0
)
{
BSP_LED_On(LED2);
}
}