Hi Alvin,
I will not used a PLL, so the frequency will be 8MHz as I understand. I've seen the AN1798.pdf document application and I didn't understand how to find the information on the example to know the tolerance admitted of the oscillator and so on to calculate the value in bauds to fullfilled the HS CAN bauds of 500kbauds. Is it the correct may to do? thanks for your help
Shigoto
(Extract of the documentation
Example 1
Calculate the bit segments for the following system constraints:Bit rate = 1M bit per second
Bus length = 20m
Bus propagation delay = 5 x 10-9 sm-1
Physical Interface (PCA82C250) transmitter plus receiver propagation delay = 150ns at 85C
MCU oscillator frequency = 8MHzStep 1: Physical delay of bus = 20 x 5 x 10-9 = 100ns
tPROP_SEG 2 100ns =( + 150ns)=500nsStep 2: A prescaler value of 1 gives a CAN system clock of 8MHz and a Time Quantum of 125ns. This will give 1000 / 125 = 8 time quanta per bit.
Step 3:
Step 4: From 8 time quanta per bit, subtract 4 for PROP_SEG and 1 for SYNC_SEG. This leaves 3 which is the absolute minimum, so PHASE_SEG1 = 1 and PHASE_SEG2 = 2.
Step 5: RJW is the smaller of 4 and PHASE_SEG1, in this case 1
Step 6: From equation (10):
From equation (11):
The required oscillator tolerance is the smaller of these values, i.e. 0.0049 (0.49%) over a period of 12.75μs (12.75 bit periods). In this case the prescaler = 1 so no reduction in oscillator tolerance can be made without using a higher MCU oscillator frequency. Also PHASE_SEG1 =1 so only one sample per bit is possible.
In summary:
Prescaler = 1
Nominal Bit Time = 8
PROP_SEG = 4
PHASE_SEG1 = 1
PHASE_SEG2 = 2
RJW = 1
Oscillator tolerance = 0.49%)
(Alban corrected copy/paste for legibility)
Message Edited by Alban on 2006-08-23 10:46 AM