cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 CAN2 Receive

kadir ustun1
Senior
Posted on March 29, 2018 at 12:41

Hello, I have a problem. when I use CAN1, I can receive data, but when ı use CAN2, I can not receive. why ?

3 REPLIES 3
Szymon PANECKI
Senior III
Posted on March 29, 2018 at 12:52

Hello Kadir,

Two ideas come to my mind.

One reason of your issue could be wrong confuguration of CAN filtering. Please refer to

https://community.st.com/0D50X00009XkWoMSAV

, which describes similar problem.

Second reason is related to relationship between CAN1 and CAN2. They share some common resources, which are managed by CAN1 always. As a result in order to use CAN2, at least clock for CAN1 has to be enabled. Please make sure that your code calls a function for CAN1 clock enabling.

Regards

Szymon

Posted on March 29, 2018 at 13:13

thank you for explain. at project, ı use CAN2 only.

Posted on March 29, 2018 at 13:15

CAN2 FÄ°TER config : 

CAN2_Filter.FilterBank = 14;

CAN2_Filter.FilterMode = CAN_FILTERMODE_IDMASK;

CAN2_Filter.FilterScale = CAN_FILTERSCALE_32BIT;

CAN2_Filter.FilterIdHigh = 0x0000;

CAN2_Filter.FilterIdLow = 0x0000;

CAN2_Filter.FilterMaskIdHigh = 0x0000;

CAN2_Filter.FilterMaskIdLow = 0x0000;

CAN2_Filter.FilterFIFOAssignment = CAN_FILTER_FIFO0;

CAN2_Filter.FilterActivation = ENABLE;

CAN2_Filter.SlaveStartFilterBank = 0;