The present invention relates to a method and a device for generating at least one program interruption in at least one user of a bus system, and a corresponding bus system.
Interconnection of control units, sensors, and actuator devices with the help of a communication system has increased markedly in recent years in the construction of modern motor vehicles and machines, in particular in the area of machine tools and in automation. Synergy effects can be achieved by distributing functions over a plurality of control units. Such configurations are referred to as distributed systems. Communication between different stations is taking place increasingly via a bus. The communication traffic on the bus, access and reception mechanisms and error handling are regulated by a protocol. Bus-specific elements of control units, sensors and actuator devices, referred to below as users, in combination with the communication network, are referred to below as a bus system.
The established protocol in the motor vehicle field is the CAN (Controller Area Network). This is an event-driven protocol; that is, protocol activities such as transmission of a message are initiated by events that originate outside of the communication system. Unambiguous access to the communication system or bus system is resolved through priority-based bit arbitration. This requires assignment of a unique priority to each message. The CAN protocol is very flexible; additional nodes and messages can be added readily, as long as there are still free priorities (message identifiers) available. The collection of all of the messages to be transmitted on the network with priorities and their sender nodes, and possibly reception nodes, are stored in a list known as the communication matrix.
An alternative to event-driven, spontaneous communication is the purely time-controlled approach. All communication activities on the bus are strictly periodic. Protocol activities such as transmission of a message are triggered only after the elapse of a time applicable to the entire bus system. Access to the medium is based on the allocation of time ranges in which a transmitter has exclusive transmission rights. The protocol is comparatively inflexible; adding new nodes is only possible when the corresponding time ranges have already been released beforehand. This circumstance forces the order of messages to be set already before start-up. A timetable is therefore created, which must fulfill the requirements of the messages in regard to repetition rate, redundancy, deadlines etc. This is known as the “bus schedule.” The positioning of the messages within the transmission periods must be synchronized with the applications that produce the contents of the messages, in order to keep the latencies between application and moment of transmission to a minimum. Failure to perform this synchronization would destroy the advantage of time-controlled transmission (minimal latency jitter when transmitting the message over the bus). Thus, the demands on the planning tools are high.
The approach to time-controlled CAN shown in German Patent Application Nos. DE 100 00 302, DE 100 00 303, DE 100 00 304 and DE 100 00 305, the so-called TTCAN (Time Triggered Controller Area network), satisfies the requirements for time-controlled communication sketched out above, as well as the demands for a certain measure of flexibility. TTCAN meets these demands by structuring the communication round (basic cycle) in exclusive time windows for periodic messages of specific communication participants, and in arbitration time windows for spontaneous messages of multiple communication participants.
A TTCAN network is assumed below as the bus system, although this is not to be understood as restrictive in regard to the present invention. Rather, the present invention explained below may also be employed for additional comparable bus systems.
In the context of a TTCAN network, German Patent Application No. DE 100 00 305 describes a method and a device for exchanging data in messages between at least two bus users which are connected by a bus system, where the messages containing the data are transmitted over the bus system by the users and each message contains an identifier that characterizes the contained data, with each user deciding on the basis of the identifier whether it will receive the message. At the same time, the messages are time-controlled by a first user by having the first user transmit a reference message repeatedly over the bus in at least one specified time interval, and the time interval is subdivided into time windows of specifiable length, with the messages being transmitted in the time windows.
Within such a bus system, a method and a device is provided which allows a program interruption to be generated in a simple manner in users and thus in control units, sensor devices, and/or actuator devices of a bus system, and the program interruption to be synchronized to the bus system, without making additional demands on the particular processor.
In particular, a method and a device, as well as a bus system, for producing at least one program interruption in at least one user of the bus system in which at least one user stores a specifiable time value in at least one memory, the time value being compared with at least one base value, and if the time value and the base time or time base match, the at least one program interruption being triggered. A time-controlled program interruption, i.e., a so-called interrupt, is thus triggered in an advantageous manner.
In a preferred embodiment, the triggering of the program interruption or interrupt is synchronized to the bus system. That means that a time which is present in the bus system itself is used advantageously as the time base or base time. The bus system here is advantageously a TTCAN network, i.e., a TTCAN system.
Expediently, the base time or time base may be equal to one of the three times or time bases: the local time, the cycle time, or the global time of the bus system. Advantageously, each user has a local time or local time base, with the base time or time base corresponding in each case to the local time of the user. It is also advantageous for the local time of one user to be utilized as the global time for the bus system, with the user functioning as timemaster of the bus system, so to speak, and the base time or time base corresponding to this global time.
It may also be advantageous if messages are transmitted in the bus system by having a reference message of one user transmitted as the cycle time at a specifiable time interval, the time interval being subdivided into time windows of specifiable length in which the messages are transmitted, with the base time corresponding to the cycle time (the bus cycle).
Advantageously, a plurality of time values are stored in one or more memories, with each time value being compared to at least one base time, enabling a plurality of program interruptions to be triggered sequentially or simultaneously.
Expediently, the base time used for comparison with the at least one time value for the bus system is fixedly defined or is changeable; in particular, it is definable from the plurality of different base times.
To signal the program interruption, i.e., interrupt, either a general interrupt signal is generated that is present in the bus system anyway, or a special interrupt signal is advantageously generated to signal the program interruption, so that this interrupt signal enables differentiation between time-controlled program interruption, including program interruption according to the present invention, and non-time-controlled, for example event-driven, program interruption.
The example embodiment of the present invention thus may provide a general method whereby in particular an autonomous TTCAN protocol controller is able to generate a time-controlled interrupt which is synchronized to the network, in particular a TTCAN network, and which is independent of the processor.
Thus, it is possible in networked control units, i.e., in distributed automation systems, in motor vehicles or in other places, for an interrupt to be generated simultaneously in a plurality of nodes of the network in particular users of the bus system, or an interrupt may be generated that is derived only from the timing signal of the communication network, in particular a TTCAN, and not from the timing signal of the processor.
Thus, the example method according to the present invention allows more precise setting of the program interruption point, and also simultaneous interrupts or program interruptions in multiple nodes of the bus system, in particular a TTCAN network. Thus in a network, in particular a TTCAN network or comparable bus system, an interrupt is triggered simultaneously in various nodes and/or users, without a special message needing to be sent for this purpose. It is also possible for an interrupt to be triggered directly in the TTCAN network that is referenced to the global time of the bus system, which is calibrated automatically in the TTCAN Level 2 independently of the processor timing signal.
The present invention is explained in greater detail below on the basis of the figures.
According to an example embodiment of the present invention, a time value is stored in a memory or register, which value is compared with a time base or base time of an autonomous protocol controller of the bus system, in particular a TTCAN. When the time base reaches the value specified by the time value in the register, the interrupt or program interruption is triggered. The interrupt may be indicated by a general interrupt signal or by a special signal for the time-controlled interrupt.
To this end,
Also contained in IC 105 are an interface unit or interface element 106, a processing unit, in particular a processor 107, and a memory 108. The time base or base time of users 100 and 105 is determined by an optionally synchronizable timer. This timer may be a standalone unit in the user itself, like element 115, or may be integrated into the processor, as illustrated by element 116 and processor 102.
Such a timer 115 or 116 thus specifies the local time of the particular bus user 100 or 105. Counters or counter circuits or the like may be used as timers. Such a timer 115 or 116 thus specifies the local time of the particular bus user 100 or 105 as the time master for the bus system. The local time specified by the time master, i.e., the corresponding timer 115, is thus used as the global time for the entire bus system, and is transmitted for example via reference messages to the other bus users, so that the local time of the time master is the global time of all bus users.
In the special example of a TTCAN system, the latter is based generally on a time-controlled periodic communication which is timed by a timer, namely the user having the master time function, using a time reference message or reference message. The period to the next reference message is known as the basic cycle, and includes the cycle time. This basic cycle in turn is subdivided into N time windows (N ε ∠), where each time window allows exclusive transmission of a periodic message of varying length. These periodic messages are then transmitted in a TTCAN controller by using time marks which are coupled to the passage of a logical and relative time. However, TTCAN also allows provision for free time windows, with these time windows being used for spontaneous messages in conjunction with arbitration on the bus and the arbitration schema being used according to CAN. Synchronization of the local time of the time master as global time with the particular internal local times of the individual users is thus provided for and efficiently implemented. There are thus three times present in the TTCAN system: the global time, the local time, and the cycle time. Referenced to the level in the TTCAN, there are thus two time bases available for selection at Level 1: the local time and the cycle time. In Level two, the global time is additionally available.
According to the present invention, all three time bases or base times may be utilized for comparison with time values, and hence for triggering program interruptions.
As described above, the example method or device and the corresponding bus system according to the present invention are based on the fact that the at least one time value for triggering a program interruption in a memory, in particular in a register, is copied as a time mark. To that end, the named memories 103 and 108 may be used executably as register banks, or optionally a memory 109 coupled separately to the bus via interface unit 110 may be used as a central storage medium for storing at least one or more time values, in order to compare each of these time values with a base time to trigger an interrupt.
Also optional is an interface element 111 having integrated processing unit 112, which links the communication network, i.e., bus 104, with a control unit 113 having integrated additional processor 114. The functionality of interrupt triggering via time comparison may also be performed in this special case by interface element 111 itself, which stores the time values or time value corresponding to the interrupt or program interruption to be triggered, either in an internal memory of the control unit such as memory 17 or central memory 109, or in a possible memory, not explicitly shown, within the interface.
The memories may have an internal structure such that a plurality of storage areas may be used, or else a register structure such that for example a plurality of registers are utilized in order to place a plurality of time values in storage simultaneously or sequentially and to define the program interruption points in time.
The base time or time base used for comparing each of the individual time values with a base time may be selected for example from one of the three previously named values, the local time, cycle time, or global time for interrupt triggering, or may be fixedly assigned to a particular memory or to register areas and fixedly specified in general for interrupt triggering throughout the entire bus system.
An example procedural sequence up to the triggering of an interrupt will be illustrated once more on the basis of
If the time base and time value are the same, that is, if the running time base has reached the time value, an interrupt is triggered in Block 203. Triggering of such a time interrupt may be signaled for example by writing an additional value of a time mark interrupt TMI to an interrupt register, in particular to the TT interrupt vector register in TTCAN. Depending on the chosen time base and the scope of the interrupt, it is thus possible to apply a program interruption selectively to individual users, ranging up to all users, that is, to the entire bus system. This also depends in part on an assignment of time value, time base, and interrupt, also representable by a memory assignment. Thus it is possible for example for local storing of a time value in the internal memory of a user to result in a merely local interrupt for that user.
When a central memory such as memory 109 is used, it is necessary to specify an exact assignment of time value, time base, and scope of the interrupt, i.e., which users are subjected to a program interruption and when. Such time mark interrupt values or TMI values may also have consequences for the entire bus system in the case of a TTCAN network. It is possible for example, using a time mark gap value in a TT gap control register, to determine whether the next reference message will be started upon activation of a time mark interrupt, i.e., the writing of a TMI value, or whether the TMI information is reset automatically with each reference message.
After the triggering of the interrupt in Block 203 and the sequences just described, Block 204, i.e., the end of the process, is reached. However, if it is found from the comparison in Block 202 that the time value and time base have not yet reached the same value, i.e., that the time base has not yet reached the time value, it is possible to query this comparison further, or optionally to insert an abort condition 205 in order to prevent the system from hanging. With the help of such an abort condition it is then possible, in particular in the event of an error, to circumvent the comparison and to attain the end of the process directly without triggering an interrupt; this may then also be followed by a specific error response or error handling procedure.
Individual interrupt signals may be indicated individually or in combination. This creates a simple procedure for regenerating program interruptions, which makes possible a time-controlled program interruption without placing any demand on the processor, independently of the processor timing and synchronously with the bus system.
Number | Date | Country | Kind |
---|---|---|---|
101 45 219 | Sep 2001 | DE | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/DE02/03398 | 9/12/2002 | WO | 00 | 9/13/2004 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO03/025686 | 3/27/2003 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
5274826 | Kardach et al. | Dec 1993 | A |
5687381 | Swanstrom et al. | Nov 1997 | A |
5881295 | Iwata | Mar 1999 | A |
6141700 | Iwata | Oct 2000 | A |
Number | Date | Country |
---|---|---|
100 00 302 | Jul 2001 | DE |
100 00 303 | Jul 2001 | DE |
100 00 304 | Jul 2001 | DE |
100 00 305 | Jul 2001 | DE |
0 886 412 | Dec 1998 | EP |
00 44194 | Jul 2000 | WO |
01 59965 | Aug 2001 | WO |
Number | Date | Country | |
---|---|---|---|
20050015521 A1 | Jan 2005 | US |