CAN setup calculator for S12(X) and MagniV devices

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CAN setup calculator for S12(X) and MagniV devices

No ratings

CAN setup calculator for S12(X) and MagniV devices

CAN setup calculator for S12(X) and MagniV devices.

 

I would like to share my CAN setup calculator I've been using for a few years.

I’ll be glad if anyone who sees any discrepancy in calculation or values would contact me with comment or idea for improvement.

Even I think the sheet is intuitive I’ll provide a few notes.

1) Entering input values

pastedImage_1.png

a) fosc – defines frequency of input clocks for CAN peripheral. It can be either oscillator clock or bus clock in dependence what is used in application.

Note: Because of CAN clock requirements I suggest to use oscillator clock as a source clock for CAN peripheral to meet oscillator precision parameter. The recommendation is based on the fact of that the PLL is usually used for bus clock generation and the PLL unlock parameter is usually out of clock specification. Especially un-lock parameter which can be observed and processed by PLL lock interrupt.

Only for example, S12ZVC defines:

 

pastedImage_2.png

b) Physical Interface Tx+ Rx propagation delay – The parameter can be calculated from the data presented in the data sheet for given CAN transceiver. A few values are presented in the top of the sheet.

 

c) Required sample point - A good general rule is to set the sample point above 80%. Based on the experiences of the automotive industry, the selected sample point should be near the 80% value.

 

2) Output values

pastedImage_3.png

 

The results field show calculations for all combinations. The simplification, I use, is the max SJW is always used.

 

Lines containing correct values for bitrate setup are highlighted with orange color. The only thing which is not checked is sample point. You should check calculated “Sample point calculated” whether it corresponds to your requirements.

There are two correct values of CANBTR0 and CANBTR1 for required bitrate but the bottom orange line meets exactly our requirement for sample point.

Attachments
Version history
Last update:
‎09-30-2017 01:44 AM
Updated by: