AnsweredAssumed Answered

CAN port 3 transmission and reception does not happen in STM32F413VH.

Question asked by Harshal Joshi on Apr 27, 2018
Latest reply on Apr 30, 2018 by T J

Hi,

I am using STM32F413VH controller with ST library and want to use all three CAN ports for my application.

following are the configurations for all CAN ports where I am trying to achieve baud rate of 250k.

input HSE frequency is 8MHz.

 

CAN1, CAN2 and CAN3 settings:

25,                                                //PRESCALER
CAN_MODE_NORMAL,               //MODE
CAN_SJW_1TQ,                         //SJW
CAN_BS1_6TQ,                          //BS1
CAN_BS2_1TQ,                          //BS2
DISABLE,                                    //TTCM
DISABLE,                                    //ABOM
DISABLE,                                    //AWUM
DISABLE,                                   //NART
DISABLE,                                   //RFLM
DISABLE                                     //TXFP

 

CAN 1 Filter settings:

0,                                                           //FilterIdHigh
0,                                                          //FilterIdLow
0,                                                          //FilterMaskIdHigh
0,                                                           //FilterMaskIdLow
CAN_FIFO0,                                         //FilterFIFOAssignment
6,                                                          //FilterNumber
CAN_FILTERMODE_IDMASK,            //FilterMode
CAN_FILTERSCALE_32BIT,               //FilterScale
ENABLE,                                              //FilterActivation
14                                                        //BankNumber

 

CAN 2 Filter settings:

0,                                                           //FilterIdHigh
0,                                                          //FilterIdLow
0,                                                          //FilterMaskIdHigh
0,                                                           //FilterMaskIdLow
CAN_FIFO0,                                         //FilterFIFOAssignment
0,                                                          //FilterNumber
CAN_FILTERMODE_IDMASK,            //FilterMode
CAN_FILTERSCALE_32BIT,               //FilterScale
ENABLE,                                              //FilterActivation
5                                                           //BankNumber

 

CAN 3 Filter settings:

0,                                                           //FilterIdHigh
0,                                                          //FilterIdLow
0,                                                          //FilterMaskIdHigh
0,                                                           //FilterMaskIdLow
CAN_FIFO1,                                         //FilterFIFOAssignment
0,                                                          //FilterNumber
CAN_FILTERMODE_IDMASK,            //FilterMode
CAN_FILTERSCALE_32BIT,               //FilterScale
ENABLE,                                               //FilterActivation
0                                                           //BankNumber

 

with above settings, I am able to do Transmission and Reception on CAN1 and CAN2.

But for CAN3 neither Transmission nor reception of data happens.

Transmission is kept on polling method.

CAN 3 always shows timeout occurred in Transmission of CAN data frame.

can anyone tell me why does it happen?

Outcomes