Method and control unit for real-time stable communication via an asynchronous data connection

DE102023209115A1Pending Publication Date: 2025-03-20ROBERT BOSCH GMBH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
DE102023209115
Authority / Receiving Office
DE · DE
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2025-03-20

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

A method for real-time stable communication between a first microcontroller (102) and a second microcontroller (104) via an asynchronous data connection (106) implemented as a point-to-point connection comprises: assigning a local data age of the transmitted data to a transmit telegram (108) containing transmit data at a transmission time of the transmit telegram (108); transmitting the transmit telegram (108) at the transmission time by the first microcontroller (102); preparing response data by the second microcontroller (104); triggering a receive interrupt; encoding a relative data age into a response telegram (110) containing the response data; and transmitting the response telegram (110) controlled by the receive interrupt. The response telegram (110) is received by the first microcontroller (102).
Need to check novelty before this filing date? Find Prior Art

Description

State of the art

[0001] The invention is based on a device or method according to the class of the independent claims. The present invention also relates to a computer program.

[0002] Vehicle control units often use more than one microcontroller. This is often motivated by expectations of redundancy due to safety requirements.

[0003] To implement a precise, fast, reliable and ideally real-time interface between the microcontrollers, either a simple synchronous method (SPI, etc.) can be used, which is not quite as robust as, for example, FlexRay or CAN-TT, the latter being more expensive.

[0004] If sensor data and their age are to be kept constant in a real-time bus, synchronization with the real-time bus clock is inevitable. However, due to the unlimited redundancy of the two microcontrollers, this isn't even necessarily desirable.

[0005] Therefore, if reliability of data provision per time and at the correct rate is desired, a real-time bus can be used, which also has system influences that are not always desired. Disclosure of the invention

[0006] Against this background, the approach presented here presents a method for real-time, stable communication via an asynchronous data connection, a control unit that uses this method, and finally a corresponding computer program according to the main claims. The measures listed in the dependent claims enable advantageous refinements and improvements of the device specified in the independent claim.

[0007] Advantageously, the presented approach allows the exact age of exchanged information to be determined despite the use of asynchronous data transmission.

[0008] A method for real-time stable communication between a first microcontroller and a second microcontroller, which are connected via an asynchronous data connection formed as a point-to-point connection, comprises the following steps: Providing transmission data by the first microcontroller; Providing a transmission telegram comprising the transmission data with a local data age of the transmission data at a transmission time of the transmission telegram using a timer of the first microcontroller; Sending the transmission telegram at the transmission time using the first microcontroller, wherein the transmission telegram is sent from the first microcontroller to the second microcontroller via the asynchronous data connection; Preparing response data by the second microcontroller; Triggering a receive interrupt in the second microcontroller in response to receipt of the transmit telegram by the second microcontroller; encoding a relative data age into a response telegram comprising the response data, controlled by the receive interrupt of the second microcontroller; Sending the response telegram controlled by the receive interrupt of the second microcontroller, wherein the response telegram is sent from the second microcontroller to the first microcontroller via the asynchronous data connection; and

[0009] Receiving the response telegram by the first microcontroller.

[0010] The microcontrollers can be part of a vehicle control unit. The microcontrollers can be processors. The asynchronous data connection can also be referred to as an asynchronous data channel and can be implemented, for example, via an asynchronous bus, via which the microcontrollers can be connected directly to each other, thus via the point-to-point connection. In the provision step, the transmission data can be prepared for subsequent transmission. The transmission data can be data generated within the first microcontroller or data that is read in by the first microcontroller and prepared for transmission in the provision step.The transmission data is to be transferred from the first microcontroller to the second microcontroller, whereby knowledge of the age of the transmission data is important, for example, for subsequent processing or verification of the transmission data after the transmission data has been received by the second microcontroller. The timer of the first microcontroller can represent a clock of the first microcontroller, which is controlled, for example, by a clock unit or a clock input of the first microcontroller. In the transmission step, the transmission telegram can be transmitted via an interface between the first microcontroller and the asynchronous data connection. By preparing the response data by the second microcontroller, the time period between receipt of the transmission telegram and transmission of the response telegram can be kept short.The response data can represent a receipt confirmation, which can be used to notify the first microcontroller that the transmission of the send telegram has been completed. The receive interrupt can be implemented as a hardware interrupt. The receive interrupt can ensure that the response telegram can be transmitted without further delay. During the transmission step, the response telegram can be transmitted via an interface between the second microcontroller and the asynchronous data connection.

[0011] Advantageously, the described approach enables the use of an asynchronous bus, whereby up to 100% data stability as well as a constant data transfer with precise information about the data age of the exchanged information can be achieved in a point-to-point network.

[0012] This means that even when using an asynchronous bus, e.g. CAN or Ethernet, there can be certainty about when the transmission telegram is actually sent and therefore also when it arrives, because it does not depend on a current bus load and prioritization (important messages first, current message has to be completed first).

[0013] In the encoding step, a timestamp representing the relative data age can be determined using a current time from a timer of the second microcontroller, a constant propagation time of the transmit telegram over the asynchronous data connection, and the local data age of the transmit data. For example, the constant propagation time of the transmit telegram and the local data age can be subtracted from the current time from the timer of the second microcontroller.

[0014] A maximum exchange time between the step of transmitting the transmission telegram and the step of receiving the response telegram can be shorter than a period of a predetermined transmission frequency with which the transmission step is repeatedly carried out. Advantageously, the steps of the method can be carried out continuously. At least the step of transmitting the transmission telegram can be carried out at the predetermined transmission frequency. By selecting a maximum exchange time shorter than the period with which further transmission telegrams can be continuously transmitted, a smooth flow of the method can be ensured. The period can be between 0.5 ms and 2 ms, for example, 1 ms.

[0015] The exchange time between the step of sending the transmit telegram and the step of receiving the response telegram can be less than or equal to the sum of the constant propagation time of the transmit telegram over the asynchronous data connection, the maximum duration of a priority interrupt of the second microcontroller, the duration of the receive interrupt, the constant propagation time of the receive telegram over the asynchronous data connection, and the maximum duration of a priority interrupt of the first microcontroller. This allows the respective signal propagation times over the asynchronous data connection and potential interrupt times of priority interrupts to be taken into account.

[0016] The method may include a step of acquiring sensor data using a sensor device. The sensor data may be provided as the transmit data in the providing step. The sensor device, for example, an acceleration sensor or temperature sensor, may be coupled to the first microcontroller via an internal or external interface.

[0017] In the transmission steps, a transmission protocol of an asynchronous CAN bus that forms the asynchronous data connection can be used. This allows for the use of a transmission protocol typically used in the automotive sector.

[0018] This method can be implemented, for example, in software or hardware or in a mixed form of software and hardware, for example in a control unit.

[0019] The approach presented here further provides a control unit configured to perform, control, or implement the steps of a variant of a method presented here in corresponding devices. This embodiment of the invention in the form of a control unit also allows the problem underlying the invention to be solved quickly and efficiently.

[0020] For this purpose, the control unit can have at least one computing unit for processing signals or data, at least one memory unit for storing signals or data, at least one interface to a sensor or an actuator for reading sensor signals from the sensor or for outputting control signals to the actuator, and / or at least one communication interface for reading or outputting data embedded in a communication protocol. The computing unit can be, for example, a signal processor, a microcontroller, or the like, wherein the memory unit can be a flash memory or a magnetic storage unit.The communication interface can be designed to read in or output data wirelessly and / or wired, wherein a communication interface that can read in or output wired data can read this data, for example, electrically or optically from a corresponding data transmission line or output it to a corresponding data transmission line.

[0021] In this context, a control unit can be understood as an electrical device that processes sensor signals and outputs control and / or data signals depending on them. The control unit can have an interface that can be implemented in hardware and / or software. In a hardware implementation, the interfaces can, for example, be part of a so-called system ASIC, which contains a wide variety of functions of the control unit. However, it is also possible for the interfaces to be separate integrated circuits or to consist at least partially of discrete components. In a software implementation, the interfaces can be software modules that are present, for example, on a microcontroller alongside other software modules.

[0022] According to one embodiment, the control unit can comprise the first microcontroller, the second microcontroller, and the asynchronous data connection as a point-to-point connection between the two microcontrollers. The steps of the aforementioned method can be executed in a distributed manner across the two microcontrollers.

[0023] Also advantageous is a computer program product or computer program with program code that can be stored on a machine-readable carrier or storage medium such as a semiconductor memory, a hard disk memory or an optical memory and is used to carry out, implement and / or control the steps of the method according to one of the embodiments described above, in particular when the program product or program is executed on a computer or a device.

[0024] Examples of the approach presented here are shown in the drawings and explained in more detail in the following description. It shows: Fig. 1 is a schematic representation of an embodiment of a device for real-time stable communication via an asynchronous data connection; Fig. 2 a schematic representation of an embodiment of a second microcontroller; Fig. 3 an embodiment of a flowchart of a method for real-time stable communication via an asynchronous data connection Fig. 4 a schematic representation of a vehicle with an embodiment of a control unit; and Fig. 5 an embodiment of a flowchart of a method for real-time stable communication via an asynchronous data connection.

[0025] In the following description of advantageous embodiments of the present invention, the same or similar reference numerals are used for the elements shown in the various figures and having a similar effect, whereby a repeated description of these elements is omitted.

[0026] Fig. Figure 1 shows a schematic representation of an embodiment of a device architecture of a device 100 with a first microcontroller 102 and a second microcontroller 104. The two microcontrollers 102, 104 are connected to each other via an asynchronous data connection 106 for signal transmission. The asynchronous data connection 106 is, for example, wired. For example, the microcontrollers 102, 104 are arranged on a common circuit board, and the asynchronous data connection 106 is implemented as a bus connection. The asynchronous data connection 106 is configured as a point-to-point connection.

[0027] For one communication cycle, the first microcontroller 102 is configured to transmit a transmit telegram 108, which is transmitted over the asynchronous data connection 106 and received by the second microcontroller 104. The transmit telegram 108 comprises transmit data that has been provided with a local data age. The second microcontroller 104 is configured to trigger a receive interrupt in response to receiving the transmit telegram 108 and, within the receive interrupt, to transmit a response telegram 110, which is transmitted over the asynchronous data connection 106 and received by the first microcontroller 102. The response telegram 110 comprises response data that is encoded with a relative data age.

[0028] Microcontrollers 102, 104 are each embodied as a processor, for example. The first microcontroller 102 is also referred to as µC1, and the second microcontroller 104 is also referred to as µC2. The described approach enables real-time, stable communication between two processors via the asynchronous data connection 106, which is embodied, for example, as an asynchronous bus.

[0029] Robust, simple, and inexpensive hardware can be used for device 100. For example, an asynchronous bus, such as CAN, is suitable as the asynchronous data connection 106.

[0030] Advantageously, the described approach enables temporally stable and reliable real-time communication without having to resort to, for example, FlexRay, CANTT, etc.

[0031] The described approach makes it possible, in a point-to-point network with the two controllers, to know exactly how often data arrives in the form of first transmit telegrams 108 and how old the information received is, despite the use of an asynchronous bus.

[0032] According to one embodiment, this can involve a redundant design of the microcontrollers 102, 104, which can be run as independently as possible. Real-time buses or synchronization are not even necessarily desired.

[0033] The device 100 is suitable for use in high-precision sensor technology, for example in autonomous driving.

[0034] According to one embodiment, a controller, here the first microcontroller 102, is declared to be the “clock generator,” and the first microcontroller 102, which is also referred to as a device, provides the transmission telegram 108 with the relative age of the transmission data at the time of a transmission command to the bus hardware.

[0035] According to one embodiment, the second microcontroller 104 represents a "receiver controller" configured to receive the transmit telegram 108 in the receive interrupt, implemented, for example, as a hardware interrupt, and to instruct the hardware directly in the interrupt to send the response telegram 110 on the asynchronous data connection 106, implemented, for example, as a data bus. According to one embodiment, the response data, also referred to simply as data, is prepared in advance, and only the relative data age is encoded into the message.

[0036] This response telegram 110 is then received again. This results in a kind of ping-pong, where the transmission telegram 108 can be described as a cyclically sent ping and the response telegram 110 as a corresponding response pong. This ping-pong has the enormous advantage of ensuring that the asynchronous data connection 106, in this case the bus, is always available. Every time one of the microcontrollers 102, 104 wants to send something, the bus is definitely free because only exactly two messages are defined, one back and one back. This results in certain advantages:

[0037] The time (t_Trans_const) from the transmit command to the receive command is constant and is also referred to as the constant propagation time over the asynchronous data connection 106. For example, the time from the transmit command to the receive command is approximately 200 us for a CAN FD with a 64 frame and a 5 Mb configuration. This time represents the pure data transfer time on an idle asynchronous data connection 106, in this case on a so-called idle bus.

[0038] Furthermore, the local data age (t_Send_age) can be encoded in the transmit telegram. The receiver takes the current clock and calculates the corresponding timestamp of the received data as t_MyTime - t_Trans_const - t_Send_age, where t_MyTime is the clock of its own device, in this case, the second microcontroller 104.

[0039] According to one embodiment, the maximum duration of the "ping-pong"—i.e., the complete exchange of data back and forth—must be below the transmission frequency of the clock generator, in this case the first microcontroller 102. According to one embodiment, this must be reliably defined because, depending on the operating system, the receive interrupt in the second microcontroller 104 will not interrupt high-priority interrupts. The maximum time for the receive interrupt is comprised of t_IRQBlock_µC1 and t_IRQBlock_µC2. Furthermore, it takes a certain amount of time to process the interrupt (t_IrqDuration_µC1 and t_IrqDuration_µC2). This results in: t_PingPong < t_Trans_const + t_IRQBlock_µC2 + t_IrqDuration_µC2 + t_Trans_const + t_IrqDuration_µC1

[0040] According to one embodiment, the exchange time (t_PingPong) between the step of transmitting the transmit telegram 108 and the step of receiving the response telegram 110 is less than or equal to a sum of the constant runtime (t_Trans_const) of the transmit telegram via the asynchronous data connection 106, a maximum duration (t_IRQBlock_µC2) of a priority interrupt of the second microcontroller 104, a duration (t_IrqDuration_µC2) of the receive interrupt, the constant runtime (t_Trans_const) of the receive telegram via the asynchronous data connection 106, and a maximum duration (t_IrqDuration_µC1) of a priority interrupt of the first microcontroller 102.

[0041] According to one embodiment, the maximum runtime of the interrupt handlers is deterministic or can be reliably calculated against a maximum. The same applies to the time of a "more important" interrupt or those interrupts that are not interrupted by the receive interrupt—or the sum of both.

[0042] Thus, even with a simple, inexpensive and robust data bus, requirements for a maximum data age and transmission bandwidth can be guaranteed if the procedure described is followed, assuming that the required communication can be represented with only one message per direction in a network with only two participants.

[0043] Fig. 2 shows a schematic representation of an embodiment of a second microcontroller 104, as it has already been described, for example, with reference to Fig. 1 is described.

[0044] The second microcontroller 104 receives the transmission telegram 108 sent by the other side, i.e., the first microcontroller. The first microcontroller acts as the clock, sending a transmission telegram 108 containing transmission data, for example, in the form of sensor data, every 1 ms.

[0045] The second microcontroller 104 sends the response in the form of response telegram 110 directly from the receive interrupt 220, for example, in the form of a hardware interrupt. The receive interrupt 220 is also referred to as RxIRQ. The receive interrupt 220 is configured to create and transmit the response telegram 110 using prepared response data 222.

[0046] Receive interrupt 220 can be partially delayed by higher or non-interruptible interrupts. These maximum times define the precision of the system, because receive interrupt 220 directly calculates the relative data age to the current clock.

[0047] Fig. Figure 3 shows an embodiment of a flowchart of a method for real-time stable communication over an asynchronous data connection. The method can be implemented, for example, using the method described in Fig. 1 described device can be implemented.

[0048] The aforementioned delay of the receive interrupt can be delayed on both sides, i.e., on the second microcontroller as well as on the first microcontroller, which, as a clock, can also have interrupts that prevent processing. However, with the second microcontroller, the transmit telegram is provided sequentially and does not need to be "prepared."

[0049] Schematically, this can be represented as follows: in the worst case, an interrupt must be completed immediately after the transfer before the reception is processed and the transmission order is carried out.

[0050] For this purpose, Fig. 3 shows the constant runtimes 330 of the transmit telegram and the receive telegram as well as a buffer 332.

[0051] It can be seen that the Tx is simply embedded in a sequence that processes the sensor data and then sends it.

[0052] Overall, the trick is to keep the interrupt blocking times as short as possible (precision) and to choose the cycle time in the chain so that it is definitely sufficient after estimating the corresponding sizes.

[0053] Fig. 4 shows a schematic representation of a vehicle 440 with an embodiment of a control unit 442 for controlling a unit 444, for example a drive or a safety device of the vehicle 440. The vehicle 440 is designed, for example, as a passenger car.

[0054] The control unit 442 comprises, according to the Fig. 1, the device described comprises the first microcontroller 102 and the second microcontroller 104, which are connected to each other via the asynchronous data connection 106 in a signal-transmitting manner.

[0055] For example only, transmission data 446 transmitted by the first microcontroller 102 via a transmission telegram is provided by a sensor device 448. The sensor device 448 is designed, for example, to detect an acceleration of the vehicle 440. By way of example, the sensor device 448 is implemented separately from the first microcontroller 102. Alternatively, the sensor device 448 and the first microcontroller 102 can also be implemented as an integrated component.

[0056] Fig. Figure 5 shows an embodiment of a flowchart of a method for real-time stable communication over an asynchronous data connection. The method can be implemented, for example, using the method described in Fig. 1 described device or the one based on Fig. 4 described control unit.

[0057] In a step 501, transmission data is provided. Optionally, the transmission data is sensor data acquired in an optional step 503 using a sensor device. In a step 505, a transmission telegram comprising the transmission data is provided with a local data age of the transmission data at a transmission time of the transmission telegram. For this purpose, a time provided by a timer of the first microcontroller is used, for example. Optionally, the transmission telegram is generated in one of steps 501, 503. In a step 507, the transmission telegram is transmitted at the transmission time, wherein the transmission telegram is sent from the first microcontroller to the second microcontroller via the asynchronous data connection.

[0058] In a step 509, response data is prepared on the second microcontroller side. In a step 511, a receive interrupt is triggered in the second microcontroller. For example, the receive interrupt is triggered in response to receipt of the transmit telegram by the second microcontroller. According to one embodiment, preparation of the response data performed in step 509 is already completed before the receive interrupt is triggered in step 511. In a step 513, controlled by the receive interrupt, a relative data age is encoded into a response telegram comprising the response data. Optionally, in the encoding step, a timestamp representing the relative data age is determined using a current time of a timer of the second microcontroller, a constant propagation time of the transmit telegram, and the local data age of the transmit data.In a step 515, the response telegram is sent under the control of the receive interrupt.

[0059] In a step 517, the response telegram is received by the first microcontroller.

[0060] For example, steps 501, 505, 507, 517 are carried out using the Fig. 1 and Fig. 4 shown first microcontroller.

[0061] For example, steps 509, 511, 513, 515 are carried out using the Fig. 1 and Fig. 4 shown second microcontroller.

[0062] According to one embodiment, steps 501, 505, 507, 509, 511, 513, 515, and 517 are executed cyclically and repeatedly. In this way, continuously updated transmission data can be transmitted from the first microcontroller to the second microcontroller. According to one embodiment, a transmission frequency with which successive transmission telegrams are transmitted is selected such that a period of the transmission frequency is greater than a maximum exchange time between step 507 of transmitting the transmission telegram and the subsequent step 517 of receiving the response telegram confirming the transmission telegram. For example, a corresponding period is between 0.5 ms and 2 ms.

Claims

[1] Method for real-time stable communication between a first microcontroller (102) and a second microcontroller (104) connected via an asynchronous data connection (106) formed as a point-to-point connection, the method comprising the following steps: Providing (501) transmission data (446) within the first microcontroller (102); Providing (505) a transmission telegram (108) comprising the transmission data (446) with a local data age of the transmission data (446) at a transmission time of the transmission telegram (108) using a timer of the first microcontroller (102); Sending (507) the transmission telegram (108) at the transmission time using the first microcontroller (102), wherein the transmission telegram (108) is sent from the first microcontroller (102) to the second microcontroller (104) via the asynchronous data connection (106); Preparing (509) response data (222) by the second microcontroller (104); Triggering (511) a receive interrupt (220) in the second microcontroller (104) in response to receipt of the transmit telegram (108) by the second microcontroller (104); encoding (513) a relative data age into a response telegram (110) comprising the response data (222) controlled by the receive interrupt (220) of the second microcontroller (104); Sending (515) the response telegram (110) controlled by the receive interrupt (220) of the second microcontroller (104), wherein the response telegram (110) is sent from the second microcontroller (104) to the first microcontroller (102) via the asynchronous data connection (106); and Receiving (517) the response telegram (110) by the first microcontroller (102). [2] Method according to claim 1, wherein in the step (513) of coding a time stamp representing the relative data age is determined using a current time of a timer of the second microcontroller (104), a constant propagation time (330) of the transmission telegram (108) via the asynchronous data connection (106) and the local data age of the transmission data (446). [3] Method according to one of the preceding claims, wherein a maximum exchange time between the step (507) of transmitting the transmission telegram (108) and the step (517) of receiving the response telegram (110) is less than a period of a predetermined transmission frequency with which the step of transmitting is repeatedly carried out. [4] Method according to claim 3, wherein the period duration is between 0.5ms and 2ms. [5] Method according to one of the preceding claims, wherein an exchange time between the step (507) of transmitting the transmit telegram (108) and the step (517) of receiving the response telegram (110) is less than or equal to a sum of the constant runtime (330) of the transmit telegram (108) via the asynchronous data connection (106), a maximum duration of a priority interrupt of the second microcontroller (104), a duration of the receive interrupt (220), the constant runtime (330) of the receive telegram via the asynchronous data connection (106) and a maximum duration of a priority interrupt of the first microcontroller (102). [6] Method according to one of the preceding claims, comprising a step (503) of acquiring sensor data using a sensor device (448), wherein the sensor data is provided in the step of providing as the transmission data (446). [7] Method according to one of the preceding claims, wherein in the steps (507, 515) of transmitting, a transmission protocol of an asynchronous CAN bus forming the asynchronous data connection (106) is used. [8] Control unit (442) for a vehicle (440), wherein the control unit (442) is configured to execute and / or control the steps of the method according to one of the preceding claims in corresponding units. [9] Computer program which is arranged to carry out and / or control the steps of the method according to one of the preceding claims. [10] A machine-readable storage medium on which the computer program according to claim 9 is stored.

Citation Information

Patent Citations

  • Parking assistance device for a motor vehicle

    DE102014107305A1

  • Synchronization system for Controller Area Networks

    DE102020125267A1

  • Vehicle command generation using vehicle-to-infrastructure communications and deep networks

    US10466716B1

  • Method for operating a system for intralogistic transport and system

    US20160234796A1

  • US000010466716B1