AnsweredAssumed Answered

STM32F4xx CAN Bus error

Question asked by shilpa Reddy on Nov 30, 2017
Latest reply on Nov 30, 2017 by Clive One

Hello ,

 

I am working on STM32F4xx CAN interface with Busmaster . Here is my initialization code:

 


/* CAN cell init */

CAN_InitStructure.CAN_Mode = CAN_Mode_Normal;
CAN_InitStructure.CAN_SJW = CAN_SJW_1tq;

 

/* CAN Baudrate = 500KBps (CAN clocked at 24 MHz) */
CAN_InitStructure.CAN_BS1 = CAN_BS1_10tq;
CAN_InitStructure.CAN_BS2 = CAN_BS2_5tq;
CAN_InitStructure.CAN_Prescaler = 3;

 

 

I have taken the example code from peripheral library, the CAN seems to work fine in loop-back mode, however in the normal mode, I am not able to transmit messages. It updates the transmission mailbox, but when the transmission request is made,  ALST0 bit is set CAN_TSR register and  LEC[2:0]: Last error code is 100 in (CAN_ESR).

 

Could you help me figure out the issue, thanks..

Attachments

Outcomes