pub
Fork of CANnucleo by
Diff: can_api.c
- Revision:
- 22:6f851728d382
- Parent:
- 20:bcd8161f8f6c
--- a/can_api.c Sat Jul 23 08:28:31 2016 +0000 +++ b/can_api.c Tue Mar 13 20:53:02 2018 +0000 @@ -122,10 +122,10 @@ switch(hz) { case 1000000: // 1000kbps bit rate - _canHandle.Init.Prescaler = 3; // number of time quanta = 36000000/3/1000000 = 12 + _canHandle.Init.Prescaler = 2; // number of time quanta = 36000000/3/1000000 = 12 _canHandle.Init.SJW = CAN_SJW_1TQ; - _canHandle.Init.BS1 = CAN_BS1_8TQ; // sample point at: (1 + 8) / 12 * 100 = 75% - _canHandle.Init.BS2 = CAN_BS2_3TQ; + _canHandle.Init.BS1 = CAN_BS1_11TQ; // sample point at: (1 + 8) / 12 * 100 = 75% + _canHandle.Init.BS2 = CAN_BS2_4TQ; break; case 500000: