Bosch Appliances TTCAN Network Card User Manual


 
User’s Manual
BOSCH
- 60/77 -
Revision 1.6TTCAN
11.11.02
manual_about.fm
5. TTCAN Application
5.1 TTCAN Configuration
The TTCAN’s default operating mode after hardware reset is Standard CAN Communication
without time triggers. The TTMode has to be switched into Configuration Mode before the
timing and system matrix setup can be written into the TTCAN’s configuration registers. It is
required that both Init and CCE are set before TTMode can be changed.
5.1.1 TTCAN Timing
The Network Time Unit (NTU) is the unit in which all times are measured. NTU is a constant of
the whole network and is defined a priori by the network system designer. In TTCAN Level 1
NTU is the nominal CAN bit time. In TTCAN Level 2 NTU is a fraction of the physical second.
The length of the NTU is defined by the Time Unit Ratio, TUR. TUR is the ratio between the
length of an NTU and the length of the FSE specific basic time unit, the system clock period.
In the TTCAN, TUR = NumAct/DenomCfg is in principle a non-integer number. NTU is the
time base for the Local Time, the integer part of Local Time (16-bit-value) will be incremented
once each NTU. Cycle Time and Global Time are both derived from Local Time. The fractional
part (3-bit-value) of Local Time, Cycle Time, and Global Time is not readable.
The default value of NumAct is NumCfg, but in nodes that are not the current time master,
NumAct may be adapted during operation in a TTCAN Level 2 network. The default length of
the NTU is given by the formula NTU = (NumCfg/DenomCfg) System Clock Period or by the
formula (NumCfg • System Clock Period) = (DenomCfg • NTU).
In a TTCAN Level 2 network, the nodes that are not the current time master will adapt their
NumAct within a specified limit in order to compensate for clock drift between their local clock
and the time master’s clock. The Synchronisation Deviation SD = |NumCfg-NumAct| is
limited by the Synchronisation Deviation Limit SDL, which is configured by its dual logarithm
ldSDL (SDL=2
(ldSDL+5)
) and should not exceed the clock tolerance given by the CAN bit
timing configuration. SD is calculated at each new Basic Cycle; when the calculated NumAct
deviates by more than SDL from NumCfg, or if the Disc_Bit in the Reference Message is set,
the drift compensation is suspended and the GTE interrupt is activated, or in case of the
Disc_Bit the Dis interrupt is activated.
There is no drift compensation in TTCAN Level 1, NumAct will always be NumCfg.
The TUR Numerator Configuration NumCfg is an 18-bit number, its bits NumCfg[150] can
be programmed in the range 0x0000-0xFFFF. NumCfg[1716] is hard wired to 0b01, so
when the number 0xnnnn is written to NumCfg[150] in the TUR Numerator Configuration
Low register, NumAct starts with the value 0x10000+0x0nnnn = 0x1nnnn.
The TUR Denominator Configuration DenomCfg is a 14-bit number, 0x0000 is an illegal value
for DenomCfg. DenomCfg[130] may be programmed in the range 0x0001-0x3FFF.
DenomCfg is set to 0x1000 and NumCfg is set to 0x10000 at hardware reset, resulting in an
NTU consisting of 16 System Clock Periods. In Level1, NumCfg must be 4•DenomCfg.In
TTCAN Level2, NumCfg must be 8•DenomCfg to allow the 3-bit resolution for the internal
fractional part of the NTU.
The clock calibration process in TTCAN Level 2 can adapt NumAct in the range of the
Synchronisation Deviation Limit SDL [NumCfg-2
(ldSDL+5)
NumCfg+2
(ldSDL+5)
]. NumCfg
should be programmed to the largest applicable numerical value in order to achieve the best
accuracy in the calculation of NumAct. TUR configuration examples are shown in Figure 18.
manual_ttcan_application.fm