2020-09-13 11:43 AM
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
2020-10-20 08:26 PM
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)."