Which result is better for S12ZVCA CAN Setup ?

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

Which result is better for S12ZVCA CAN Setup ?

Jump to solution
921 Views
aaronlee
Contributor V

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?)

500kbps_20m_01.png500kbps_20m_02.png

Is the input correct or not?

Which result is best? What do you recommend?

 

Best Regard,

Aaron

Tags (1)
0 Kudos
1 Solution
913 Views
lama
NXP TechSupport
NXP TechSupport

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

View solution in original post

0 Kudos
3 Replies
908 Views
aaronlee
Contributor V

Hi

0 Kudos
914 Views
lama
NXP TechSupport
NXP TechSupport

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

0 Kudos
898 Views
aaronlee
Contributor V

Hi Ladislav,

Very useful. Thank you very much.

Yes, I used  MSCAN0ExtClk.

01_Clock_Bitrate.png

Do you recommend using a higher frequency of the external crystal? Ex: 16MHz or 20MHz?

 

Best Regard,

Aaron

0 Kudos