cancel
Showing results for 
Search instead for 
Did you mean: 

CAN bit timing options?

colinconstant
Associate II

I've been using the following two bit timings for a CAN bus speed of 500K on the STM32F103. I was just wondering which is better? Does it make any difference? Is there another preferred option? Thanks a lot for any insight.

 //(1+9+8)*4 = 72 
 //1+9+8=16 1+9=10 10/16 = sp62.5 tq18  
CAN_InitStructure.CAN_SJW = CAN_SJW_1tq; 
CAN_InitStructure.CAN_BS1 = CAN_BS1_9tq;
CAN_InitStructure.CAN_BS2 = CAN_BS2_8tq;
CAN_InitStructure.CAN_Prescaler = 4; 
  
 //(1+13+4)*4=72 
 // 1+13+4=18 1+13=14 14/18= sp77.8% tq18
 CAN_InitStructure.CAN_SJW = CAN_SJW_1tq; 
 CAN_InitStructure.CAN_BS1 = CAN_BS1_13tq;
 CAN_InitStructure.CAN_BS2 = CAN_BS2_4tq;
 CAN_InitStructure.CAN_Prescaler = 4; 

Thanks again,

Colin

1 REPLY 1
AndreasPA
Associate III

not an expert but the sample point has an effect dependant of the application.

"(87.5 % is the preferred value used by CANopen and DeviceNet, 75% is the default value for ARINC 825)."

http://www.bittiming.can-wiki.info/