I'm trying to get CAN up and running on a STM32f303re. I've ported the CAN Networking sample over from the STM32373C eval board sample sources to the STM32f303re. It is starting to work as I can send a packet and it appears to get to the 2nd STM32 across the physical CAN bus based on looking at the TX and RX lines on the 2 devices but it never seems to trigger the CAN TX or RX interrupts. I see that the 303 has different interrupts than the eval board processor. I've tried to map them correctly but so far have had no luck.
So, even though the packet gets transmitted across the physical layer, I am getting a timeout error in the HAL_CAN_Transmit(...) function below:
/* Request transmission */
/* Get tick */
tickstart = HAL_GetTick();
/* Check End of transmission flag */
/* Check for the Timeout */
if(Timeout != HAL_MAX_DELAY)
if((Timeout == 0U) || ((HAL_GetTick()-tickstart) > Timeout))
hcan->State = HAL_CAN_STATE_TIMEOUT;
/* Cancel transmission */
/* Process unlocked */
return HAL_TIMEOUT; // getting this timeout
I would assume that this is because the TX interrupt is not getting called and it's not indicating that the transmission is complete. Has anyone succeeded at getting CAN working on the STM32F303re? Any pointers on setting up the interrupts?
Thanks for any suggestions.