cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0B1KxT CAN not working

Alihussain Vohra
Associate III

Hi Team,

I am using STM32G0B1KxT and code is successfully uploaded. The code is referred from sample code only still it is not working. Here CAN is CANFD but I am using as classic mode.

I am attaching snippet of CAN part and main.c file. 

 

CAN.PNG

 

1 REPLY 1
Tinnagit
Senior II

for RX CAN filter, I had use 

  if (HAL_FDCAN_ConfigFilter(&hfdcan1, &sFilterConfig) != HAL_OK)
  {
    /* Filter configuration Error */
    Error_Handler();
  }

and I use HAL_FDCAN_ActivateNotification to activate RX Filter to Interrupt
so I have to get RX message on HAL_FDCAN_RxFifo0Callback by HAL_FDCAN_GetRxMessage and after get those message you should activate it again.

and the other, I'm not sure about baud rate configuration but somehow you can test the register operation on loopback mode.