The question about CanBus Configure in the Model Based Software Design

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

The question about CanBus Configure in the Model Based Software Design

1,010 Views
edenli
Contributor V

Hi Guys,

I used the the Simulink Block of MPC5643L from NXP,I wanna use it to realize the CANbus comunicatin,the External crystals is 8MHz,The target of the Baud Rate is 500K:

 I use the CANalyzer to display the signal,but the Error shown as below:

188433_188433.pngpastedImage_1.png

My configure about the CanBus Configure shown as below:

188434_188434.pngpastedImage_7.png188438_188438.pngpastedImage_8.png

My calculation about the Baud rate as below:

Baud Rate=8000,000/(Prescaler*(1+(PROP_SEG+PSEG1+2)+(PSEG2+1)));

So i fill in the parameter,Prescaler=1,PROP_SEG=5,PSEG1=5,PSEG2=2,

Is there some thing wrong about the calcaulation?

The attachment is the Simulink Model.

Original Attachment has been moved to: can_simple_block1.slx.zip

0 Kudos
4 Replies

795 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi edenli

Something is wrong with the formula. It's not working on my side neither. Why do you want to change the XTAL frequency ?

constantinrazvan.chivu‌,

Can you please add the formula used to compute the CAN baud-rate depending on all parameters in the Toolbox.

Thank you!

Daniel

0 Kudos

795 Views
edenli
Contributor V

Hi Daniel,

About the question ,Now i have solved it:smileyhappy:,but another question aomes again,i post it in a new topic ,haha,:smileygrin:,

If you have time to focus it

Best Regards!

Eden Li

0 Kudos

795 Views
dumitru-daniel_
NXP Employee
NXP Employee

How did you fix it ? Can you share the solution with us ? Where was the bottleneck ?

Thank you!

Daniel

0 Kudos

795 Views
edenli
Contributor V

Hi Daneil,

The XTAL in MPC5643L dual motor board is 8MHz,so i need to change it.But the Error i can not solve.

0 Kudos