Skip to main content
Ramazan Gülcan
Associate III
September 12, 2018
Solved

CAN BUS RECEIVE INTERRUPT

  • September 12, 2018
  • 6 replies
  • 5217 views

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);

}

This topic has been closed for replies.
Best answer by Ramazan Gülcan

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​ 

6 replies

Ramazan Gülcan
Associate III
September 12, 2018

:waving_hand:

Tesla DeLorean
Guru
September 12, 2018

Make sure you have the IRQ Handler plumbed

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Ramazan Gülcan
Associate III
September 12, 2018

@Community member​ 

Tesla DeLorean
Guru
September 12, 2018

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?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Ramazan Gülcan
Associate III
September 12, 2018

@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?

Ramazan Gülcan
Ramazan GülcanAuthorBest answer
Associate III
September 12, 2018

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​