‎2018-09-12 01:47 AM
Hi;
Can not interrupt CAN BUS application?
I'm using the following code
void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan)
{
HAL_CAN_GetRxMessage(&hcan1, CAN_RX_FIFO0, &RxMessage, RxData);
}
Solved! Go to Solution.
‎2018-09-12 09:28 AM
Hi;
I solved the problem. the following function must be used,
HAL_CAN_ActivateNotification(&hcan1, CAN_IT_RX_FIFO0_MSG_PENDING);
thanks for your answers @Community member​
‎2018-09-12 05:59 AM
:waving_hand:
‎2018-09-12 06:02 AM
Make sure you have the IRQ Handler plumbed
‎2018-09-12 08:19 AM
‎2018-09-12 08:52 AM
Ok, so is there traffic on the bus at 164062.5 baud for it to actually receive?
Your exact set up is poorly explained. You have an STM32 F4 running at 168 MHz? How is the bus connected? And to what?
‎2018-09-12 09:07 AM
@Community member​ It works properly without interruption. The connections are solid. interrupt is not working while only receiving data. callback function in new hal driver library has changed. which new function should be used?
‎2018-09-12 09:28 AM
Hi;
I solved the problem. the following function must be used,
HAL_CAN_ActivateNotification(&hcan1, CAN_IT_RX_FIFO0_MSG_PENDING);
thanks for your answers @Community member​