Hi,
My project requirement as follow:
Application: Automotive
MCU: S12ZVCA19MLF
External Crystal: 12MHz
CAN Bit Rate: 500Kbps
CAN Cable Length: < 20m
Slew Rate: 4 (Which value is the best on this project?)
Is the input correct or not?
Which result is best? What do you recommend?
Best Regard,
Aaron
Solved! Go to Solution.
Almost,...
Slew rate 4 requires Rx+Tx propagation delay 153ns. (You left there 255 ns) However, it does not change anything in result in this case.
I suppose you want to use oscillator clock as a CAN clock. (CANCTL1_CLKsrc=0)
One think which has interested me is the change of required sample point and the change in result. The file does not use dynamic calculations to get absolutely optimum solution and this approach has provided closer setup to 80% sample point than directly entered input for 80%. The change of sample point makes different spilitting of segments. (probably in some future I will rebuilt the file for dynamical calculations)
What I would like also to mention is the requirement on sample point. I mean whether you accept later sample point or not. 83.3% is closer to 80% than 75 %. (but...youl see bellow)
I have stolen from another article: "An early sample point decreases the sensitivity to oscillator tolerances and allows lower-quality oscillators. A late sample point allows for a longer signal propagation time and therefore a longer bus. A later sample point is useful for non-ideal bus topologies. The CAN-in-Automation user’s group makes recommendations of where the sample point should be for various bit rates, with 87.5% the most common."
If you require sample point 80% (based on, I think, required input) then I would use use result line for 83.3% (CANBTR0=0x41, CANBTR1=0x18)
Best regards,
Ladislav
Hi
Almost,...
Slew rate 4 requires Rx+Tx propagation delay 153ns. (You left there 255 ns) However, it does not change anything in result in this case.
I suppose you want to use oscillator clock as a CAN clock. (CANCTL1_CLKsrc=0)
One think which has interested me is the change of required sample point and the change in result. The file does not use dynamic calculations to get absolutely optimum solution and this approach has provided closer setup to 80% sample point than directly entered input for 80%. The change of sample point makes different spilitting of segments. (probably in some future I will rebuilt the file for dynamical calculations)
What I would like also to mention is the requirement on sample point. I mean whether you accept later sample point or not. 83.3% is closer to 80% than 75 %. (but...youl see bellow)
I have stolen from another article: "An early sample point decreases the sensitivity to oscillator tolerances and allows lower-quality oscillators. A late sample point allows for a longer signal propagation time and therefore a longer bus. A later sample point is useful for non-ideal bus topologies. The CAN-in-Automation user’s group makes recommendations of where the sample point should be for various bit rates, with 87.5% the most common."
If you require sample point 80% (based on, I think, required input) then I would use use result line for 83.3% (CANBTR0=0x41, CANBTR1=0x18)
Best regards,
Ladislav
Hi Ladislav,
Very useful. Thank you very much.
Yes, I used MSCAN0ExtClk.
Do you recommend using a higher frequency of the external crystal? Ex: 16MHz or 20MHz?
Best Regard,
Aaron