Utility model content
For above-mentioned problems of the prior art, the technical problems to be solved in the utility model is:How to solve
TTCAN buses too rely on host node and easily produce synchronization failure, and time drift causes synchronous error excessive.
Synchronization failure is produced easily in order to solve TTCAN buses and too rely on host node, time drift causes synchronous error
Excessive, the utility model proposes a kind of time cycle control element, which includes:
Including:Enumerator, and the state machine containing programmable n status information;Wherein, state machine is with enumerator
Count every time and change status information coding successively, and the status information is sequentially output by outfan (SB0) and encode to CPU.
Further, the state machine also includes the phase place machine containing 4 phase information codings, and passes through another outfan
(SB1) it is sequentially output the phase information to encode to CPU.
Further, the status information coding constitutes the external timing signal with the programmable n cycle.
Further, the status information coding and phase information are encoded and constitute the external timing signal with n*4 cycle
This utility model also proposed a kind of TTCAN communication controls module, it is characterised in that include:CPU, interface module,
And according to above-mentioned time cycle control element;Wherein:CPU distinguishes Connection Time periodic Control element and interface module;When
Between periodic Control element be used to periodically send the external timing signal to CPU, CPU using the external timing signal as
The sequential trigger trigger event of CPU time periodic scheduling table, and carried out with CAN and system equipment by interface module
Data exchange.
This utility model also proposed a kind of TTCAN communication control systems of vehicle, including CAN network, and several systems set
Several described TTCAN communication control modules standby and one-to-one with the system equipment;Wherein, it is several described
TTCAN communication controls module all adopts identical time cycle control element, and provides the external timing signal of same period;Institute
State system equipment to be connected with CAN network by TTCAN communication control modules, constitute TTCAN communication networks.
It is complete to TTCAN network controlling networks that the module sends periodicity cadence signal using external time periodic Control element
Office's time cycle and local time cycle, substantially eliminate the time drift of TTCAN network nodes generation, due to time synchronized it is complete
Controlled by external hardware element, therefore, the impact of the network time synchronization not running status of master node.
Specific embodiment
Referring to Fig. 1, it is the module connection figure of TTCAN communication controls module of the present utility model.Which includes:CPU, interface mould
Block, and time cycle control element.CPU distinguishes Connection Time periodic Control element and interface module;CPU passes through interface module
Data exchange is carried out with CAN and system equipment.
The configuration of interface module is as follows:
1) module CAN port:Two outside isolated form CAN driver groups are connected by the built-in two-way CAN controller of module CPU
Into broader data bandwidth can be provided when two-way CAN is used alone, it is also possible to be used in combination and backuped each other.
2) SPI communication ports:The built-in two-way SPI communication ports of module CPU, can be logical with Upper system CPU by SPI communication ports
News exchange message, is then sent through CAN mouths.Two-way SPI can be used alone, it would however also be possible to employ the mode of backuping each other is used in combination.
3) RS232 communication ports:The built-in two-way RS232 communication ports of module CPU (LVTTL level), by RS232 communication ports
CAN mouths can be then sent through with Upper system CPU communications exchange message.Same two-way RS232 can be used alone, it is also possible to
Joint SPI mouth is used.
4) I/O input-output lines:Can be used to be used as to shake hands with Upper system CPU.
The TTCAN communication controls module using specific external time periodic Control element send periodicity cadence signal to
CPU, so as to controlling network length of a game cycle and local time cycle.
Used as a preferred embodiment, the periodic timing trigger of the external time periodic Control element is by 16
Period of state output lead and phase output line composition in 2 cycles, maximum can constitute 16*4=64 local time's cycle.
The external time periodic Control element mainly by enumerator and state machine into.
Used as schematic embodiment, this utility model employs module down counter:Down counter is by 24 d type flip flops
Composition, when module resets, down counter is preset frequency dividing constant n.During work, a pulse is often input into, down counter subtracts one,
The output state trigger when computer is reduced to 0, often triggers once, and module status machine enters next state.
State machine adopts 16 finite state machines, 16 bar state output leads:
State table:
Above-mentioned 16 states are exported by SB0 pins.
As the presently preferred embodiments, the external time periodic Control element also includes two phase output lines, constitutes 4 phase places
Information.
16 states above, each period of state are divided into the parts such as 4 phase places:
Above-mentioned 4 states are exported by pin SB1.Thus, constitute 16*4=64 local time to export in the cycle to CPU (ginsengs
See Fig. 2).
Output lead TINT:It is a few microsecond width positive pulses that a width is sent during each State Transferring, and the signal can conduct
The markers of test global synchronization, it is also possible to as the interrupt request singal or latch signal of giving CPU.
The TTCAN communication controls module sends periodicity cadence signal using external time periodic Control element and controls to CPU
Network global time cycle processed and local time cycle.Periodic timing trigger has 16 bar state cycle output leads and 2
Phase output line composition in cycle, maximum can constitute 16*4=64 local time's cycle, when all adopting on a network
During the TTCAN communication control modules, because each module has a clock of unified parameters, each module Uniting it is complete by hardware
Control identical length of a game's cycle and the local time cycle, therefore intermodule produce time drift be negligible.Separately
Outward, the length of a game of bus network and subcycle time controlled by external hardware element completely, therefore, network time synchronization is not received
The impact of the running status of host node.
Presently describe the course of work of external time periodic Control element:
Module internal reset after system electrification, input line RST# of time cycle control element, synchronous input line ST#, this
Two lines are connected respectively to electro-detection in module and reset, synchronous input end.When it is low level that this two pins wherein have one
State machine enters state 0 and initializes Clock dividers.After reset or synchronization, state machine output lead output 0,000 0000
0000 0001 simultaneously phase output line be output as 00, output lead TINT is output as 0.When RST#, ST# line is height simultaneously, module is opened
Beginning work.State- output line, phase line, the periodic output pulse signal of inside modules TINT line.
After CPU receives above-mentioned local time's periodic signal, signal is identified, and by the sequential in round-robin scheduling table
Sequencing Frame was transmitted in order to local time's cycle, that is, realize TTCAN network schedulings.
In the case of multimode networking work, reset circuit is typically triggered by house dog in circuit, each chip
TINT lines output pulsion phase illustrates the situation of each RST# input time delay to time difference, and ST# lines are input into a negative arteries and veins
After punching, the TINT lines output pulsion phase of each inside modules is just disappeared substantially to time difference, reaches multimode networking synchronization
Purpose.
Referring to Fig. 3, be the TTCAN communication control systems of vehicle, including CAN network, several system equipments and with it is described
The one-to-one several TTCAN communication controls modules of system equipment;Wherein, all of TTCAN communication controls module all adopts phase
Same time cycle control element, and the external timing signal of same period is provided;The system equipment is logical by TTCAN controls
News module is connected with CAN network, constitutes TTCAN communication networks.
In normal operation, TTCAN communication controls module can be in the specific time period, by several communication control modules
One of them automatically send reset signal to CAN network, so as to initialize week time of all communication control modules
Phase control element, to unify all transmission to the external timing signal of CPU.Can automatically be divided by cycle period dispatch list
Above-mentioned reset signal is sent in the specific time period with certain module.
Meanwhile, CPU can monitor the specific ID message frame transmitted on identification network according to specific time sequence trigger, work as discovery
The message frame time beat is abnormal, when device power resets, the network operation when put into an equipment again at any time, then network needs
Resynchronisation, at this moment only needs to just make network reach global synchronization to one negative pulse of ST# lines of time cycle control element.
Whether effectively the negative pulse can be by different distributed modules (by software) according to the working condition () of module, automatically
Applied by certain module, or (hardware) directly applies from bus.
The watchdog reset when certain equipment runs, CPU are restarted, and are at this moment restarted due to CPU and can't cause the total of outside
Line Time Triggered synchronous element resets, therefore the outside sequential triggering cycle can be re-recognized after CPU reworks.
The system is modular construction, easily realizes starting design from top when network is constituted, and module is only responsible for
Communication, it is unrelated with the use function of part of appliance.
When on the network of TTCAN communication control systems all using the TTCAN communication control modules when because each module
There are the clock of unified parameters, each module Uniting and complete identical length of a game's cycle and local time's week by hardware controls
Phase, thus intermodule produce time drift be negligible.The markers output lead of module as state latch signal or in
Disconnected trigger gives communication CPU, represents the beginning in local time's cycle, it is also possible in module as a test markers
Signal, time delay between test module, the time delay reflect the performance of module global synchronization in network communication.With hard
Part method time delay is less than 2 clock pulses, and send the module time of Signalling method generation with communication CPU (software) from bus
Delay should be less than a CAN positions time.
The TTCAN networks of structure solve bus and too rely on host node and easily produce synchronization failure, and time drift is caused
The problems such as synchronous error is excessive.
Preferred embodiment of the present utility model is the foregoing is only, protection model of the present utility model is not intended to limit
Enclose.All any modification, equivalent substitution and improvements made within spirit of the present utility model and principle etc., are all contained in this reality
With in new protection domain.