Method for Serially Transmitting a Frame from a Transmitter to at Least One Receiver by Means of a Bus System, and a Subscriber Station for a Bus System

20170288807 · 2017-10-05

    Inventors

    Cpc classification

    International classification

    Abstract

    The disclosure relates to a method for serially transmitting a frame from a transmitter to at least one receiver by means of a bus line, as well as a subscriber station for a bus system. According to said method, stuff bits are inserted into the frame by the transmitter according to a predetermined rule in order to generate additional signal edges, and/or said stuff bits are removed again by the receiver when evaluating the frame, at least one item of information relating to a subsection of the frame additionally being added, and transmitted, outside of this subsection, and said subsection containing a predetermined sequence of bit values.

    Claims

    1. A method for the serial transmission of a frame, the method comprising: transmitting the frame from the from a transmitter to a receiver via a bus line; inserting, before the transmitting, stuff bits into the frame with the transmitter according to a predetermined rule to generate additional signal edges; removing, after the transmitting, the stuff bits with the receiver in an evaluation of the frame; and inserting into the frame at least one item of information concerning a segment of the frame, the segment having a predetermined sequence of bit values, the at least one item of information being inserted outside the segment of the frame.

    2. The method as claimed in claim 1, wherein at least one of: the frame includes a header part, a data part and an end part; the frame includes a header part having an identifier; the frame includes a CRC checksum; and, the segment includes no stuff bit.

    3. The method as claimed in claim 2, further comprising: transmitting the at least one item of information in one of the data part and the header part of the frame.

    4. The method as claimed in claim 1, further comprising: transmitting the at least one item of information at least partially in at least one of (i) an RRS bit, (ii) a res bit, (iii) a “ESI” bit of a CAN FD frame, and (iv) an additional checksum in a data part.

    5. The method as claimed in claim 1, further comprising: comparing, with the receiver, in the evaluation of the frame, the at least one item of information concerning the segment of the frame with the segment of the frame; and assessing, depending on a result of the comparison, whether the frame is valid.

    6. The method as claimed in claim 1, wherein at least one of: the segment ends with that bit after which at the earliest a stuff bit into the frame by the transmitter; and the segment of the frame comprises four bits and the at least one item of information is inserted in two bits outside the segment.

    7. The method as claimed in claim 1, wherein at least one of: the segment of the frame comprises up to three bits and the at least one item of information is inserted in a bit outside the segment; and the segment of the frame comprises up to three bits with a same level, which are directly preceded in the frame by a further bit with the same level outside the segment.

    8. The method as claimed in claim 1, wherein the segment of the frame is four first bits of an identifier of a CAN FD frame.

    9. A subscriber station for a bus system, the subscriber station comprising: a transmitting/receiving device configured to at least one of (i) transmit a frame to and (ii) receive the frame from a further subscriber station of the bus system via a bus line; and a verifying device configured to verify at least one item of information concerning a segment of the frame, wherein the transmitting/receiving device is configured to at least one of (i) before transmitting the frame, insert stuff bits into the frame according to a predetermined rule to generate additional signal edges, and (ii) remove the stuff bits from the frame, when evaluating the received frame, wherein the verifying device is configured to insert the at least one item of information concerning the segment of the frame into the frame outside the segment, and wherein the segment has having a predetermined sequence of bit values.

    10. A bus system comprising: a bus line, and at least two subscriber stations configured to be connected to one another via the bus line such that they can communicate with one another, at least one of the at least two subscriber stations comprising: a transmitting/receiving device configured to at least one of (i) transmit a frame to and (ii) receive the frame from a further subscriber station of the at least two subscriber stations via the bus line; and a verifying device configured to verify at least one item of information concerning a segment of the frame, wherein the transmitting/receiving device is configured to at least one of (i) before transmitting a frame, insert stuff bits into the transmitted frame according to a predetermined rule to generate additional signal edges, and (ii) remove the stuff bits from the frame when evaluating the received frame, wherein the verifying device is configured insert the at least one item of information concerning the segment of the frame into the frame outside the segment, and wherein the segment has a predetermined sequence of bit values.

    Description

    DRAWINGS

    [0025] The invention is described in more detail below on the basis of exemplary embodiments and with reference to the accompanying drawing, in which:

    [0026] FIG. 1 shows a simplified block diagram of a bus system according to a first exemplary embodiment;

    [0027] FIG. 2 shows a representation of a structure of a frame in the case of the bus system according to the first exemplary embodiment; and

    [0028] FIG. 3 to FIG. 6 respectively show with respect to a second exemplary embodiment the format of CAN FD frames with the placement of the first four identifier bits (ID28-ID25) to be checked and of the check bit RRS.

    [0029] Unless otherwise stated, in the figures elements that are the same or functionally the same are provided with the same reference signs.

    FIRST EXEMPLARY EMBODIMENT

    [0030] FIG. 1 shows in a first exemplary embodiment a bus system 1, which may for example be a CAN FD bus system. The bus system 1 may be used in a vehicle, in particular a motor vehicle, an aircraft, etc., or in the industrial sector, for example in control installations etc., or in a hospital.

    [0031] In FIG. 1, the bus system 1 has a bus line 3, to which a multiplicity of subscriber stations 10, 20, 30 are connected. Via the bus line 3, frames 50 can be transmitted in the form of signals between the individual subscriber stations 10, 20, 30, The subscriber stations 10, 20, 30 may be for example control devices, sensors, display devices, etc. of a motor vehicle.

    [0032] As shown in FIG. 1, the subscriber station 10 has a communication control device 11, a verifying device 12 and a transmitting/receiving device 13. It goes without saying that the verifying device 12 may also be part of the communication control device 11. By contrast, the subscriber station 20 has a communication control device 21, a verifying device 22 with an insertion unit 22A and an evaluation unit 223, and a transmitting/receiving device 23. The subscriber station 30 has a communication control device 31, a verifying device 32 and a transmitting/receiving device 33, which has the verifying device 32. The transmitting/receiving devices 13, 23, 33 of the subscriber stations 10, 20, 30 are respectively connected directly to the bus line 3, even if this is not represented in FIG. 1.

    [0033] The communication control devices 11, 21, 31 respectively serve for controlling a communication of the respective subscriber station 10, 20, 30 via the bus line 3 with another subscriber station of the subscriber stations 10, 20, 30 connected to the bus line 3. The communication control devices 11, 21, 31 may be respectively configured like a conventional CAN FD controller. The communication control devices 11, 21, 31 may also be respectively formed as part of a microcontroller, which is likewise comprised by the respective subscriber station 10, 20, 30.

    [0034] The transmitting/receiving devices 13, 23, 33 may be respectively configured like a conventional CAN FD transceiver.

    [0035] The verifying devices 12, 22, 32 may also be configured as software modules, which form part of the software running on the subscriber station. In this case, the method according to the present invention is fully implemented in software.

    [0036] The first exemplary embodiment describes a method for verifying CAN FD frames with identifiers in a way corresponding to the aforementioned cases 1) and 2), The method is respectively carried out with the verifying devices 12, 22, 32.

    [0037] FIG. 2 shows very schematically the structure of a CAN FD frame 50 without the Start of Frame bit (SAF), which is transmitted directly before the frame 50 via the bus line 3. The frame 50 has a header part 51, 51A, 52, a data field 53, 54, 55, and also an end part 56, which forms the end of the frame. The header part 51, 51A, 52 has in a first segment 51 the first four bits of the identifier (ID) 51, 51A, in a second segment 51A the remaining bits of the identifier 51, 51A and a control field 52. The data field 53, 54, 55 has in a first part 53 a byte 0, in a second part 54 further bytes and in a third part 55 a byte n.

    [0038] Shown in FIG. 2 is one of many possible placements of the first segment 51, which has the first four identifier bits (ID28-ID25) to be checked, in the data field 53, 54, 55. To be more precise, in FIG. 2 the first four identifier bits (ID28-ID25) to be checked are arranged in the first part 53 of the data part 53, 54, 55, that is to say the byte 0. The end part 56 or the end of the frame of the CAN FD frame 50 contains the CRC.

    [0039] In the method according to the present exemplary embodiment, the verification is performed quite generally by inserting the first four bits of the identifier into the data field 53, 54, 55 of the CAN FD frame. This method. does not require any modifications to existing CAN FD controllers, such as the communication control devices 11, 21, 31.

    [0040] In order that a receiver, for example the subscriber station 10, can detect whether the identifier 51, 51A of a received CAN FD frame 50 has been falsified by an erroneously sampled Start of Frame bit, a copy of the first four bits of the identifier ID28-ID25 (segment 51) affected by this effect is stored in the data field 53, 54, 55 of the CAN FD frame by the transmitter, for example the subscriber station 30, to be more precise its verifying device 32. The receiver, that is to say in the case of the example mentioned the subscriber station 10, then compares with the aid of its verifying device 12, 22, 32 the four identifier bits from the data field 53, 54, 55 with the identifier bits ID28-ID25 51 received by it. If they do not match, the frame 50 is rejected.

    [0041] If the subscriber station 20 is a transmitter, the copy of the first four bits of the identifier ID28-1125 (segment 51) affected by this effect is stored by the insertion unit 22A of the verifying device 22 in the data field 53, 54, 55 of the CAN FD frame 50, for example in the byte 0, as shown in FIG. 2. If the subscriber station 20 is a receiver, the evaluation unit 22B of the verifying device 22 compares the four identifier bits from the data field 53, 54, 55 with the identifier bits ID28-ID25 51 received by the subscriber station 20.

    [0042] In respect of the weakness of the CAN FD CRC tests, only two cases are relevant, as presented in the previously shown Table 1. In all other cases, the falsified identifier 51, 51A is reliably detected by the CRC.

    [0043] The four identifier bits ID28 to ID25 shown. in Tables 1 and 2, the segment 51, may therefore be stored in the upper four bits of the first data byte in the data field 53, 54, 35 of the CAN FD frame 50, as shown in FIG. 2. They may, however, also be stored in any desired place in the data field 53, 54, 55.

    [0044] The described method may be carried out for each identifier 51, 51A. Alternatively, it is however also possible that the verifying device 22 only carries out the described verification if the identifier 51, 51A begins with the two critical combinations “0000” and “0001”, that is to say a predetermined sequence of hit. values for a segment 51 of the CAN FD frame 50.

    [0045] The first four identifier bits (ID28-ID25) stored in the data field 53, 54, 55 of the CAN FD frame 50 as segment 51 allows an identifier 51, 51A that has been changed by a falsified Start of Frame bit to be reliably detected. Consequently, the gap created by the CRC weakness can be closed. Quite generally, the segment 51, which is stored in the data field 53, 54, 55 of the CAN FD frame 50, can end with the bit after which at the earliest a stuff bit is inserted into the frame 5060; 70; 600; 700) by the transmitter.

    [0046] The method has the advantage that no hardware modification to the CAN FD controllers 11, 21, 31 is necessary. This means that the initialization vector for the CRC generator does not have to be modified, Consequently, two incompatible hardware versions are avoided.

    [0047] According to a modification of the first exemplary embodiment, alternatively a coding in the data field 53, 54, 55 with two bits F1 and F2 for the segment 51 would also be possible. Bit F1 is set to zero if the identifier bits ID28-ID26 are zero, otherwise the bit F1 has the value one. Bit F2 indicates the value of ID25. This is shown as an overview in the following Table 2.

    TABLE-US-00002 TABLE 2 Coding of Identifier data field ID25 ID27 ID26 ID25 F1 F2 0 0 0 0 0 0 0 0 0 1 0 1 other IDs 0/1 1 0/1

    [0048] In this way, a verification of the identifier bits ID28-ID25 can be achieved with less memory requirement in the data field 53 to 55 than in the case of the first exemplary embodiment.

    [0049] A further possibility for a modification of the first exemplary embodiment would be that, for the case where the identifier 51, 51A of the frame 50 to he sent begins with the critical combinations “0000” and “0001”, the transmitter increases by one the data length code (DLC) in accordance with ISO 11898-1 in the control field 52, and then stores the four identifier bits ID28-ID25, the segment 51, or the two bits F1 and F2 for the four identifier bits ID28-ID25, in an unused byte of the thereby increased data field 53, 54, 55. This would have the advantage that the division of the data bytes of the data field 53, 54, 55 among the payload data can remain unchanged. The data length code DLC in the control field 52 is shown in FIG. 3 to FIG. 6 for the second exemplary embodiment.

    [0050] Yet a further alternative for a modification of the first exemplary embodiment exploits the fact that the payload data in the data field 53, 54, 55 are often verified by an additional checksum, such as for example the Message Authentication Code. This checksum is transmitted together with the payload data in the data field 53, 54, 55, for example in the third part 55 for the byte n or at some other place in the data field. If the identifier bits ID28-ID25, the segment 51, are then also included in the checksum calculation, the receiver, to be more precise its verifying device 22 or evaluation unit 223, can detect the falsified identifier bits 51 by means of this second checksum.

    [0051] The use of the described. method can be demonstrated by the behavior of the subscriber stations 10, 20, 30 with communication control devices 11, 21, 31 and verifying devices 12, 22, 32.

    SECOND EXEMPLARY EMBODIMENT

    [0052] In the case of this exemplary embodiment, the bus system 1 is configured in large parts in the same way as described above with reference to the first exemplary embodiment. As a. difference from the first exemplary embodiment, the present exemplary embodiment describes a method for verifying CAN FD frames with identifiers in a way corresponding to case 1) and 2) by additional transmission of an item of information, for example a checksum, concerning the content of the first four bits of the identifier at a different place within the CAN FD frame than in the case of the first exemplary embodiment and modifications thereof mentioned.

    [0053] The additional transmission of an item of information, for example a checksum, concerning the content of the first four bits of the identifier makes a detection of the error cases previously described with reference to Table 1 possible.

    [0054] This has the advantage that, as a result, the gap in error detection created by the CRC weakness can be closed. The frame or message formats of the CAN and CAN FD frames or messages remain unchanged; there is merely a corresponding item of information written into a control bit.

    [0055] FIG. 3 shows a frame 60 sent by one of the subscriber stations 10, 20, 30 with up to 16 data bytes in the CAN FD base format. The frame 60 has an SOF bit 61 and also a number of frame fields, such as an arbitration field 62, a control field 63, a data field 64 and a checksum field 65 (CRC field). The arbitration field 62 comprises in the base ID field an identifier of the frame 60. Arranged at the end of the arbitration field 62 is an RRS bit. The control field 63 begins with an IDE bit, which is followed by an FDF bit and then by a res bet and a then-following ERS bit and then an ESI bit, which is followed by a DLC field. The data field 64 is not present if the DLC field of the control field 63 has the value 0. The checksum field 65 contains in a CRC-seq field a CRC checksum and ends with a then-following CRC delimiter CRC-Del. The fields and bits mentioned are known from ISO-CD-11898-1, and are therefore not described in more detail here.

    [0056] In FIG. 3, the length of an arbitration phase 67 in the case of the present exemplary embodiment is indicated. The arbitration phase 67 is followed by the data phase 68 if the ERS bit in the frame 60 is recessive. The frame 60 has a header part 61 to 63, a data part 64 and an end part 65.

    [0057] In FIG. 3 to FIG. 6, dominant bits are represented by a broad line at the lower edge of the frame 60. Recessive bits are represented in FIG. 3 to FIG. 6 by a broad line at the upper edge of the frame 60.

    [0058] As shown in FIG. 3, the associated communication control device 11, 21, 31 of the transmitter has created the frame 60 in such a way that the SOF bit, the RRS bit, the IDE bit and the res bit are dominant, whereas the FDF bit and the CRC delimiter CRC-Del are recessive.

    [0059] FIG. 4 shows a frame 600 sent by one of the subscriber stations 10, 20, 30, with more than 16 data bytes in the CAN FD base format. The frame 600 is constructed in the same way as the frame 60 from FIG. 3 apart from a longer data field 640 in comparison with the data field 64 and a longer checksum field 650 in comparison with the checksum field 65. The frame 600 has a header part 61 to 63, a data part 640 and an end part 650.

    [0060] FIG. 5 shows a frame 70 sent by one of the subscriber stations 10, 20, 30, with up to 16 data bytes in the CAN FD extended format. According to FIG. 5, the frame 70 has an SOF bit 71 and also a number of frame fields, such as an arbitration field 72, a control field 73, a data field 74 and a checksum field 75 (CRC field). The arbitration field 72 comprises in the base-ID field and the ID-ext field an identifier of the frame 70. Provided between the base-ID field and the ID-ext field are an SER bit and an IDE bit. Arranged at the end of the arbitration field 72 is an RES bit. The control field 73 begins with an FDF bit, followed by a res bit. There then follows a ERS bit and an ESI bit. The control field 73 ends with the DLC field. The data field 74 is not present if the DLC field of the control field 73 has the value 0. Otherwise, the frame 70 is constructed in the same way as the frame 60 from FIG. 3 and has a corresponding arbitration phase 77 and data phase 78. The frame 70 has a header part 71 to 73, a data part 74 and an end part 75.

    [0061] As shown in FIG. 5, the associated communication control device 11, 21, 31 of the transmitter has created the frame 70 in such a way that the SOF bit, the RES bit and the res bit are dominant, whereas the SEE bit, the IDE bit and the CRC delimiter CRC-Del are recessive.

    [0062] FIG. 6 shows a frame 700 sent by one of the subscriber stations 10, 20, 30, with more than 16 data bytes in the CAN FD extended format. The frame 700 is constructed in the same way as the frame 70 from FIG. 5 apart from a longer data field 740 in comparison with the data field 74 and a longer checksum field 750 in comparison with the checksum field 75, The frame 700 has a header part 71 to 73, a data part 740 and an end part 750.

    [0063] In order that a receiver, for example the subscriber station 20, can detect whether the identifier 62, 72 of a received CAN FD frame 60, 70, 600, 700 has been falsified by an erroneously sampled Start of Frame bit 61, 71, in the case of the affected messages or frames 60, 70, 600, 700 an item of information concerning the content of the first four bits ID28-ID25 of the identifier 62, 72 affected by this effect is stored as a segment of the frame 60, 70, 600, 700 in a bit outside the data field 64, 74, 640, 740, for example in the RRS bit of the CAN FD frame 60, 70, 600, 700, by the transmitter, for example the subscriber station 10. This item of information is for example RRS=1 for 0001 and RRS=0 for 0000. In all other cases, the RRS bit is transmitted dominant, as previously provided, as shown in FIG. 3 to FIG. 6.

    [0064] Quite generally, here too the segment of which the information is stored in a bit outside the data field 64, 74, 640, 740 can end with the bit after which at the earliest a stuff bit is inserted into the frame 60, 70, 600, 700 by the transmitter.

    [0065] In a modification of the second exemplary embodiment, the item of information for the RRS bit is provided as RRS=0 if the first four bits 28 to 25 of the identifier 62, 72, in other words ID28-ID25, as a segment of the frame 60, 70, 600, 700, have a value of 0001, and RRS=1 if the first four bits 28-25 of the identifier 62, 72 have a value of 0000.

    [0066] To check that the first four bits of the identifier 62, have been received correctly, the receiver first tests or checks in a corresponding method whether, in the data frame 60, 70, 600, 700 received by it, there is for the identifier 62, 72=000 for (ID28, ID27, ID26) , where (ID28, ID27, ID26) corresponds to the bits 28 to 26 in base ID.

    [0067] If this test or check finds that (ID28, ID27, ID26) is unequal to 000, no further test is performed.

    [0068] If, however, the test or check finds that (ID28, ID27, ID26) is equal to 000, the receiver compares the content of bit 25 of the identifier 62, 72, that is to say ID25, with the content of the RRS bit in the data frame 60, 70, 600, 700 received by the receiver.

    [0069] If they do not match, the received frame 60, 70, 600, 700 is rejected or assessed as valid, i.e. the receiver sends an error flag.

    [0070] If they do match, the frame 60, 70, 600, 700 is not rejected and is assessed as valid.

    [0071] In the case of the aforementioned modification of the second exemplary embodiment, the two aforementioned measures that are provided for no match and a match are correspondingly reversed. That is to say that, if there is a match, the received frame 60, 70, 600, 700 is rejected, i.e. the receiver sends an error flag. And if there is no match, the frame 60, 70, 600, 700 is not rejected.

    [0072] In a further modification of the second exemplary embodiment, the still remaining or unoccupied “res” bit and/or the “ESI” bit is/are additionally employed and F1 and F2 are used. These bits have been described more precisely above with reference to the first exemplary embodiment and the modifications thereof.

    [0073] It is however also possible to insert after the ESI hit one or more additional bits for the transmission of the information, for example F1 and F2.

    [0074] The RRS bit is transmitted in CAN FD frames 60, 70, 600, 700 at the same position at which the RTR bit is transmitted in classical CAN frames.

    [0075] The working version of the ISO standard. relating to CAN FD (ISO 11898-1) provides that RRS bits are only provided in CAN FD frames 60, 70, 600, 700, it being intended that the RRS bit should be transmitted in CAN FD frames 60, 70, 600, 700 at the position of the RTR bit in classical CAN frames and that the RRS bit should be transmitted dominant, but receivers should accept recessive and dominant RES bits. (“ERS bit [only in FD Frames] The RRS bit shall be transmitted in FD Frames at the position of the RTR bit in Classical Frames. The RRS bit shall be transmitted dominant, but receivers shall accept recessive and dominant RRS bits.”

    [0076] Since at the time of the transmission of the RRS bit it has not yet been established for the receiver whether the received frame 60, 70, 600, 700 or, of the received frame is a classical CAN or a CAN FD frame 60, 70, 600, 700 or message, the evaluation can only be carried out after transmission of two further bits (IDE bit and FDF bit) for Basic Format (frames 60, 600) or a further bit (FDF bit) for Extended Format (frames 70, 700).

    [0077] The RTR or RRS bit is included. in considerations in the arbitration for bus access. This does not lead to problems, however, because: if the transmission of two frames is started. simultaneously by two different. subscribers, one frame, for example a frame 60, beginning with 0000 and having RRS=0, and the other frame, for example a frame 700, beginning with 0001 and having RRS=1, the first transmitter wins the arbitration (assuming that the transmitters are functioning correctly) and the value of the RRS bit plays no part in the arbitration.

    [0078] The use of the described method can be demonstrated by the behavior of the subscriber stations 10, 20, 30 with communication control devices 11, 21, 31 and verifying devices 12, 22, 32.

    [0079] All of the refinements described above of the bus system 1, the subscriber stations 10, 20, 30 and the method may be used individually or in all possible combinations. In particular, all of the features of the previously described exemplary embodiments and/or the modifications thereof may be combined as desired or be omitted. In addition, the following modifications are conceivable in particular.

    [0080] The bus system 1 according to the exemplary embodiments that is described. above is described on the basis of a bus system based on the CAN FD protocol, The bus system 1 according to the exemplary embodiments may however also be another kind of communication network. It is advantageous, but not an absolute prerequisite, that with the bus system 1 exclusive, collision-free access of a subscriber station 10, 20, 30 to a common channel is ensured, at least for certain time periods.

    [0081] There may be any desired number and arrangement of the subscriber stations 10 to 30 in the bus system 1 of the exemplary embodiments and modifications thereof. In particular, there may also only be subscriber stations or 20 or 30 in the bus system 1. Any desired combinations of the subscriber stations 10 to 30 in the bus systems 1 are possible.

    [0082] The segment 51, 62, 72 of the frame 50, 60, 70, 600, 700 does not necessarily have to have the four first bits of the identifier of a CAN FD frame. The segment may also contain some other predetermined sequence of bit values. The predetermined sequence may have at least two bits.