first , I think I know how to calculate the CAN bus Baud rate form the parameter in picture blew ,this is a CAN FD config.
clock frequency :80000 k
pre-scaler :1
so we can get the Tq = 1/80000 K
BTL cycles : 40
time for a bit = 40 * (1/80000K) = 1/2000k
So we can get the baud rate = 1/ (1/2000k) = **2000k .**
this Baud rate which we calculated is equal to the value which the CANoe Generated.
But what puzzles me is :when I use this method to calculate the Baud Rate for a CAN(not CAN FD),the result is different from the value which the CANoe generated ,why ??? is there something different between CAN and CAN FD ?? could you please to help me ? thank you very much !
clock :16000K
Pre-sacler :1
tq = 1/16000k
BTL : 16
time for a bit = 16*1/16000k = 1/1000k
baud rate = 1000k
but result generate via CANoe is 500k ,seems somewhere i missing a "divide by 2 " ??
the CAN control chip for CANOE is SJA1000 ,from the CANOE help document.
for this chip : CAN clock = system clock * pre-scaler * 2 the key-point of this question is the "2" here ,for other chip ,such as STM32F103 ,Clock set for CAN bus is 36Mhz,it doesnt need to divide by “2”
so the clock frequency below maybe the system clock I guess
According to this rule, I set the parameters of another development board, and the measured communication was successful.
meanwhile the user of CANOE should just focus on Baud rate and sample point ,There is no need to pay too much attention to other parameters.
Hope this helps you