About CAN communicaton with STM32F042
Hi!
I am testing CAN communication using STM32F042.
The settings for CAN communication on the same two boards are also set the same.
One board transmits data through CAN communication once per second, and the other board receives data.
If I check the CAN_RX pin (pin no. 21) of the receiving board's stm32F042 with an oscilloscope, I can see the received signal.
But However, the program does not receive it.
Below is the setting and the code for receiving.
Here is parameter setting.

Here is NVIC setting.

HAL_CAN_Start(&hcan); // in main function.
Here is callback function
void HAL_CAN_RxCpltCallback(CAN_HandleTypeDef *phcan)
{
if(HAL_CAN_GetRxMessage(phcan, CAN_RX_FIFO0, &canRxHeader, &canRx0Data[0]) != HAL_OK) {
}
else {
printf("RX : %c%c%c%c%c%c%c%c\r\n", canRx0Data[0], canRx0Data[1], canRx0Data[2], canRx0Data[3], canRx0Data[4], canRx0Data[5], canRx0Data[6], canRx0Data[7]);
}
}