FlexCAN_Library icon indicating copy to clipboard operation
FlexCAN_Library copied to clipboard

Question to the bitTimingTable

Open MarkusLange opened this issue 4 years ago • 2 comments

Hello Collin,

I have a question about the Table where did you get the values from and you say "Only really 8 and 16 have been validated" how or against what did you confirm that?

uint8_t bitTimingTable[21][3] = {
    // prop, seg1, seg2 (4 + prop + seg1 + seg2, seg2 must be at least 1)
    // No value can go over 7 here.
    {0,0,1}, //5
    {1,0,1}, //6
    {1,1,1}, //7
    {2,1,1}, //8
    {2,2,1}, //9
    {2,3,1}, //10
    {2,3,2}, //11
    {2,4,2}, //12
    {2,5,2}, //13
    {2,5,3}, //14
    {2,6,3}, //15
    {2,7,3}, //16
    {2,7,4}, //17
    {3,7,4}, //18
    {3,7,5}, //19
    {4,7,5}, //20
    {4,7,6}, //21
    {5,7,6}, //22
    {6,7,6}, //23
    {6,7,7}, //24
    {7,7,7}, //25
};

B.R. Markus

MarkusLange avatar May 01 '21 16:05 MarkusLange

8 and 16 happen to be where the common baud rates are - 500k and 250k. And, both of those work. The rest are just kind of filled in to make a table from 5 to 25 and haven't been really verified to work. I don't know how well it matches or works with weird CAN speeds nor am I aware of anyone attempting to test anything other than 250 and 500k.

collin80 avatar May 03 '21 14:05 collin80

Hello Collin,

good to know, so you testet 2 Teensy against each other? I ask because I rewrite some parts of an CAN Lib. for an Atmel Chip build in CAN-Controller, and the truth is even if you calculate the values guided by the Papers from Bosch, you get for the valid Range of the "Time Quantas" 3 correct combinations for a Baudrate of 250k/500k with all you can communcate from one to another but 2 different valid configurations can't hear another.

MarkusLange avatar May 03 '21 15:05 MarkusLange