Apparatus for transmitting data over a bus system and operating method for that purpose
11665019 · 2023-05-30
Assignee
Inventors
- Arthur Mutter (Neuhausen, DE)
- Florian Hartwich (Reutlingen, DE)
- Franz Bailer (Moessingen, DE)
- Ramona Jung (Stuttgart, DE)
- Thomas Enderle (Munich, DE)
Cpc classification
H04L67/12
ELECTRICITY
International classification
Abstract
An apparatus for transmitting data over a bus system, having a storage device for at least temporary storage of messages transmittable over the bus system. The apparatus is designed to check at least one message, stored in the storage device, for at least one criterion and to alter at least one portion of the message based on the check.
Claims
1. An apparatus for transmitting data over a bus system, comprising: a storage device configured to at least temporary store messages transmittable over the bus system; wherein the apparatus is configured to check at least one message, stored in the storage device, for at least one criterion, and to alter at least one portion of the message based on the check; wherein the alteration includes alteration of a priority identifier in the message based on a type of payload of the message, including altering the priority identifier so as to assign a higher priority to the message based on the message having a first type of payload, and altering the priority identifier so as to assign a lower priority to the message based on the message having a second type of payload.
2. The apparatus as recited in claim 1, wherein the bus system is a CAN XL bus system.
3. The apparatus as recited in claim 1, further comprising: a filter device configured to carry out the check and/or the alteration.
4. The apparatus as recited in claim 1, wherein the storage device has a receive buffer for at least temporary storage of messages received over the bus system and/or a transmit buffer for at least temporary storage of messages to be transmitted over the bus system, and wherein the apparatus is configured to check and/or to alter at least one of the received messages and/or at least one of the messages to be transmitted.
5. The apparatus as recited in claim 1, wherein the alteration includes adapting and or setting at least one data field of the message, the at least one data field characterizing a payload or header of the message.
6. The apparatus as recited in claim 1, wherein the alteration is carried out based on information of at least one data field of the message.
7. The apparatus as recited in claim 1, wherein the apparatus is configured to carry out the check and/or the alteration based on configuration data, the configuration data characterizing at least one of the following elements: a) the at least one criterion, b) further criteria for the check, c) information for the alteration of the at least one portion of the message.
8. The apparatus as recited in claim 7, wherein the apparatus is configured to store the configuration data in a protected memory, the protected memory being writable by a hardware security module, but not by an application program executable on a computing device for transmitting and/or receiving the data over the bus system using the apparatus.
9. The apparatus as recited in claim 1, wherein the apparatus is configured to carry out the check and/or the alteration a) one time and/or b) based on events and/or c) repeatedly periodically.
10. The apparatus as recited in claim 1, wherein the apparatus is configured to erase a message from the transmit buffer when at least one criterion for the erasure is satisfied, including when: a) a predefinable maximum number of arbitration procedures with respect to the message has been reached and/or when b) a predefinable waiting time has elapsed.
11. The apparatus as recited in claim 1, wherein the message is placed earlier or later on the bus, relative to other messages, depending on a priority of the message.
12. The apparatus as recited in claim 1, wherein the priority identifier is used for message arbitration.
13. A control unit for a motor vehicle, comprising: an apparatus for transmitting data over a bus system, including: a storage device configured to at least temporary store messages transmittable over the bus system; wherein the apparatus is configured to check at least one message, stored in the storage device, for at least one criterion, and to alter at least one portion of the message based on the check; wherein the alteration includes alteration of a priority identifier in the message based on a type of payload of the message, including altering the priority identifier so as to assign a higher priority to the message based on the message having a first type of payload, and altering the priority identifier so as to assign a lower priority to the message based on the message having a second type of payload.
14. A method for operating an apparatus for transmitting data over a bus system, the apparatus having a storage device for at least temporary storage of messages transmittable over the bus system, the method comprising the following steps: checking, by the apparatus, at least one message, stored in the storage device, for at least one criterion; and altering, by the apparatus, at least one portion of the message based on the check; wherein the altering includes alteration of a priority identifier in the message based on a type of payload of the message, including altering the priority identifier so as to assign a higher priority to the message based on the message having a first type of payload, and altering the priority identifier so as to assign a lower priority to the message based on the message having a second type of payload.
15. A method, comprising: providing an apparatus for transmitting data over a bus system, the apparatus including a storage device configured to at least temporary store messages transmittable over the bus system, wherein the apparatus is configured to check at least one message, stored in the storage device, for at least one criterion, and to alter at least one portion of the message based on the check, wherein the alteration includes alteration of a priority identifier in the message based on a type of payload of the message, including altering the priority identifier so as to assign a higher priority to the message based on the message having a first type of payload, and altering the priority identifier so as to assign a lower priority to the message based on the message having a second type of payload; and using the apparatus for at least one of: a) filtering of the messages transmittable and/or transmitted over the bus system, b) modifying of the messages transmittable and/or transmitted over the bus system, c) forcing a specific value for at least one data field of the message, d) preventing manipulation of messages by a program executable on an control unit, e) open and/or closed-loop controlling of a utilization of the bus system.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
DETAILED DESCRIPTION OF EXAMPLE EMBODIMENTS
(10)
(11) The apparatus has a storage device 110 for at least temporary storage of messages N transmittable over bus system 10, for example, apparatus 100 being designed (see
(12) For instance, in further exemplary embodiments, apparatus 100 takes the form of a CAN XL transceiver, e.g., a hardware circuit.
(13) In other exemplary embodiments, a filter device 120 (
(14) In further exemplary embodiments,
(15) In other exemplary embodiments, check 202 and/or alteration 204 is/are thus carried out on messages N, N-E, N-S which are located at least temporarily in storage device 110, e.g., in transmit buffer 110b and/or receive buffer 110a.
(16) In additional exemplary embodiments, alteration 204 (
(17) By way of example,
(18) In other exemplary embodiments, data frame DR has one or more of the following data fields or data-field contents:
(19) Priority_ID: Identifier, e.g., for an arbitration, usable for regulating prioritization for the bus access,
(20) XL: Data field which characterizes a data-frame format, e.g., whether it is a CAN FD data frame or a CAN XL data frame,
(21) ADS: Arbitration Data Switch, e.g., for switching the bit rate from arbitration phase to data phase,
(22) PT: Payload Type, characterizes a type of the payload DB,
(23) DLC: Data Length Code,
(24) HCRC: Header CRC, checksum, e.g., to secure the header,
(25) DB: Payload, e.g., 1 to 2048 bytes,
(26) FCRC: Frame CRC, checksum, e.g., to secure payload DB,
(27) DAS: Data Arbitration Switch, e.g., for switching the bit rate from data phase to arbitration phase,
(28) RP: Re-integration Pattern, e.g., for bus users which have or have determined an invalid header checksum HCRC,
(29) ACK/NACK: Positive/negative acknowledgment (confirmation) bits,
(30) EOF: End Of Frame, e.g., to indicate the end of data frame DR.
(31) In further exemplary embodiments,
(32) In additional exemplary embodiments, alteration 204 (
(33) In further exemplary embodiments, apparatus 100 alters a priority ID of messages dynamically (during operation) based on a content of the specific message and/or based on operating data of apparatus 100, for example.
(34) In other exemplary embodiments, apparatus 100 determines a checksum (e.g., for CRC) of an outgoing message (corresponding, e.g., to criterion K1) dynamically (during operation) and writes it into message N (block 204 according to
(35) In additional exemplary embodiments, apparatus 100 is designed to carry out check 202 and/or alteration 204 based on configuration data CFG (
(36) In other exemplary embodiments, (see optional step 200 from
(37)
(38) In further exemplary embodiments (
(39) In further exemplary embodiments, it may thus be ensured that a possibly compromised software PRG is not able to manipulate protected memory CFG′ of apparatus 100a. As a consequence, even if software PRG or control unit 20 is compromised, apparatus 100a is still able to carry out its check 202 and possible alteration 204 (
(40) In further exemplary embodiments, this mechanism may also be used to the effect that, for example, with the aid of check 202, apparatus 100a determines whether harmful information is contained in a data frame DR (
(41) In additional exemplary embodiments, configuration data CFG may have a list of several filter criteria (“filter list”), for example, based on which the message(s) may be checked or filtered in order, for instance, to select the message(s) for a possible alteration 204, e.g., if at least one of the several filter criteria applies. For example, since the filter list is in memory CFG′ which is protected from access by software PRG, in other exemplary embodiments, the software is not able to alter filter list CFG. For instance, in the case of additional exemplary embodiments, filter list CFG can only be written into protected memory CFG′ by hardware security module HSM for use by filter device 120a, for example.
(42) In further exemplary embodiments, apparatus 100, 100a is designed to carry out check 202 and/or alteration 204: a) one time and/or b) based on events and/or c) repeatedly, e.g., periodically.
(43) In the event steps 202 and/or 204 is/are carried out one time, according to additional exemplary embodiments, alteration 204, e.g., in the sense of a modifying filtering (filtering, e.g., with the aid of step 202, modifying, e.g., with the aid of step 204), is applied one time to an incoming or outgoing message, for instance. In this context, for example, frame-modifying filter may be implemented directly between CAN (XL-) bus 10 (Rx) and Rx buffer (receive buffer) 110a (
(44) In the event steps 202 and/or 204 is/are carried out repeatedly, e.g., periodically, according to other exemplary embodiments, alteration 204, e.g., in the sense of a modifying filtering, is applied regularly to Tx/Rx buffer 110a, 110b, for instance. In that case, for example, apparatus 100 or 120a checks messages one after another in transmit buffer 110b, e.g., in the sense of block 202 according to
(45) In further exemplary embodiments, apparatus 100, 100a is designed to erase a message from transmit buffer 110b when, for example, at least one criterion for the erasure is satisfied, such as when: a) a predefinable maximum number of arbitration procedures (that is, transmit attempts) with respect to the message has been reached (this corresponds, e.g., to a message with “expiry date,” which is a function, for example, of the usage of bus 10 by other nodes, for instance) and/or when b) a predefinable waiting time (e.g., 100 milliseconds) has elapsed (this corresponds to a message with absolute “expiry date,” for instance).
(46) Additional exemplary embodiments relate to a control unit 20 (
(47) Further exemplary embodiments,
(48) Additional exemplary embodiments,
(49) In the following, further advantageous aspects and specific embodiments are described, which in each case individually or in combination with each other, are able to be combined with at least one of the specific embodiments described above by way of example.
(50) In the case of additional exemplary embodiments, the principle according to the specific embodiments may be used to assign a virtual CAN bus identification (VCAN ID), i.e., a VCAN identifier to at least one message N. With the aid of the VCAN ID, the message traffic of bus system 10 may be separated into a plurality of logical networks, for example, each of which has a different VCAN ID.
(51) For example, in other exemplary embodiments, data frame DR shown by way of example in
(52) In additional exemplary embodiments, there are various possibilities for transmitting the VCAN ID in CAN (XL-) data frame DR (
(53) In further exemplary embodiments, messages for a diagnostic communication over bus system 10 are identified by a specific value in the payload type (PT, see
(54) In other exemplary embodiments, apparatus 100, 100a, or rather its filter device 120, 120a, is configured in such a way that it (e.g., in block 202,
(55) In additional exemplary embodiments, messages with a different payload (that is, payload type) are assigned to a different VCAN.
(56) In further exemplary embodiments, software PRG (
(57) In other exemplary embodiments, the principle according to the embodiments may be used for assigning the priority of a message, for instance.
(58) For example, CAN XL uses the priority ID for the arbitration of messages (see reference mark Priority_ID from
(59) In a further exemplary embodiment,
(60) In additional exemplary embodiments, a TX Filter Element TXFE-1 characterizes a data structure, e.g., in the main-memory RAM, which determines how an individual filter is configured, thus, e.g., which fields of data frame DR (
(61) In other exemplary embodiments, the number of TX Filter Elements TXFE-1, TXFE-2, . . . may be configured in a memory, e.g., a register R, of Tx Message Handler TX_MH.
(62) Analogous to optional Tx Message Handler TX_MH, in further exemplary embodiments, an optional Rx Message Handler RX_MH, thus, a device for processing messages received or to be received, may also be provided, which, for example, is able to use a second filter list (“Rx Filter List”) FL-2, comparable to the usage of first filter list FL-1 by Tx Message Handler TX_MH, for instance.
(63) For example, in additional exemplary embodiments, for each message, the (Tx and/or Rx) Message Handler checks, e.g., the Payload Type field and/or other fields on the basis of the respective filter list. In further exemplary embodiments, the filter logic (e.g., implemented by filter device 120a) decides which priority ID is used for the message in question, depending on the value of the field.
(64) In other exemplary embodiments, each bus user or node has a certain number of priority IDs which the respective node uses: For example, in the case of three priority IDs, a node could have (i) one high-priority ID, (ii) one medium-priority ID and (iii) one low-priority ID. With the aid of frame-modifying filtering, in further exemplary embodiments, each data frame is assigned a priority ID, e.g., according to blocks 202, 204 from
(65) In further exemplary embodiments, for example, in an implementation variant with a “cyclical execution”, filter device 120, 120a (in the case of other exemplary embodiments also denotable as “frame-modifying filter”) may have different functions which, in additional exemplary embodiments, may be specified, e.g., via configuration possibilities (such as flags, which may be part of configuration data CFG (
(66)