METHOD FOR INITIALIZING A SERIAL COMMUNICATION BUS SYSTEM
Patent Information
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- ELMOS SEMICON AG
- Filing Date
- 2021-03-01
- Publication Date
- 2026-05-21
AI Technical Summary
Existing methods for initializing serial communication bus systems, particularly in automotive applications, are complex and time-consuming, requiring multiple cycles for auto-addressing participants, which complicates programming and efficiency.
A method where a bus master sends an initialization command to the first participant, which increments a counter and sends position information to the bus master, and this process is repeated until the last participant, allowing each participant to obtain a unique counter reading based on its position, enabling simple and efficient auto-addressing.
This method simplifies the initialization process by ensuring each participant receives a distinct counter value, facilitating efficient and rapid addressing without the need for multiple cycles, and includes provisions for detecting and bypassing defective participants.
Description
[0001] The invention relates to a method for initializing a serial communication bus system, in which a bus master and a number N of participants, with N being a natural number greater than or equal to 2, are connected to a communication bus and the participants are interconnected via the communication bus by connecting a first participant to the bus master and a second participant to the first participant and so on, up to the Nth, i.e. last, participant, which is connected to the penultimate participant.
[0002] Such communication bus systems therefore have a daisy-chain connection between the participants and between the first participant and the bus master. Downstream of the bus master is the daisy-chain connection of the participants, with the second participant downstream of the first, the third downstream of the second, and so on. Upstream of the last participant, i.e., the Nth participant, is the penultimate participant, i.e., the (N-1)th participant.
[0003] Such communication bus systems are increasingly used for interior lighting applications in vehicles. They are characterized by high transmission rates and a simple design. One such communication bus already used outside the automotive sector is the LVDS standard, which uses differential voltage signals to send information from the bus master to the connected devices.
[0004] One requirement for particularly cost-effective communication bus systems is that their participants must be addressed during each initialization. Known methods perform this auto-addressing in several cycles, which can be complex in terms of programming and time.
[0005] German patent DE-A-199 31 999 describes an arrangement of barcode readers in a bus system for industrial applications such as conveyor or production systems. The barcode readers are connected to a control unit via supply lines and are queried by the control unit using a specific address. The barcode readers are connected to the control unit in a series, with the address values of each reader corresponding to their position within the series. Before address assignment, the connection between each barcode reader and its adjacent reader is interrupted by open switches. Address assignment begins with the barcode reader located closest to the control unit. This reader receives the address sent by the control unit via the supply line and reports the address acceptance to the control unit.This barcode reader then closes its switches, thus electrically connecting it to the next barcode reader in the series. The control unit increments the address counter and sends the incremented address value to the second barcode reader. This reader receives the address and reports the address transfer back to the control unit, which then closes its switches to establish the connection to the third barcode reader in the series. This process repeats until the last barcode reader in the series has received its address. If the control unit then sends the next address, there are no barcode readers left to receive it, and therefore the control unit cannot be notified that the address has been transferred.After a certain period of time, the control unit recognizes, based on the lack of feedback, that the previously assigned address was the last address to be assigned. The control unit then instructs this last barcode reader to close another previously open switch, which electrically activates a terminating resistor. Every barcode reader has this terminating resistor; however, only the last barcode reader in the series circuit activates its terminating resistor.
[0006] US-A-4,982,185 and WO-A-92 / 04675 describe further communication bus systems with auto-addressing of their participants, whereby the participants receive their addresses starting with the participant in the chain connection closest to the control unit. The last participant in the chain connection, located furthest from the control unit, signals back to the control unit when it has received its address. Thus, the control unit is informed that the auto-addressing process is complete.
[0007] The object of the invention is to provide a particularly simple method for initializing a serial communication bus system.
[0008] To solve this problem, the invention provides a method for initializing a serial communication bus system, in which a bus master and a number N of participants, with N being a natural number greater than or equal to 2, are connected to a communication bus and the participants are interconnected via the communication bus by connecting a first participant to the bus master and a second participant to the first participant, and so on, up to the Nth, i.e., last participant, which is connected to the penultimate participant, wherein in the method The bus master sends an initialization command to the first participant connected to the bus master. The first participant receives the initialization command, increments a counter, forwards the initialization command to the second participant connected to it, and sends position information to the bus master via the communication bus. This position information is a first position signal indicating that the first participant is not the Nth and therefore last participant connected to the communication bus. The bus master receives the first position signal from the first participant and increments a counter. From the second participant to the Nth participant, for each i-th participant, where i = 2, 3, ..., N, the process is repeated such that the i-th participant receives the initialization command from the (i-1)-th participant.a counter is incremented and position information is sent to the bus master and to the first participant up to the (i-1)th participant, which is the first position signal if the i-th participant is not the N-th and therefore last participant, and which is a second position signal if the i-th participant is the N-th and therefore last participant, each participant from the first participant up to the (i-1)th participant only increments its counter upon receiving the first position signal, the bus master increments its counter with each receipt of a first position signal and this process ends when the bus master receives the second position signal from the N-th participant, and each participant has a counter reading different from the counter readings of the other participants after the end of this process,which identifies him and specifies his position within the sequence of participants connected to the communication bus, so that each participant can now be addressed or his counter reading forms the participant's address.
[0009] According to the inventive method, the bus master sends an initialization command to the first connected participant, which may, for example, be a calibration data frame that maintains a constant level over the length of the data frame. This level is, for example, the voltage level for logic 0 or logic 1. The first participant responds to this initialization command by incrementing an internal counter. For example, the initial value of this counter (as well as the counters of all participants) is zero, with the increment being, for example, one.The first participant recognizes that it is not the last participant in the series connection and sends an initial position signal to the bus master via a communication feedback channel. This signal indicates that the first participant is not the last (and therefore not the Nth) participant connected to the communication bus. Only the last participant recognizes that the communication bus is "open" downstream, which is due to the fact that the participants have a terminating resistor at their inputs, where they are connected to the outputs of the participants immediately upstream.
[0010] The second participant, connected to the first participant, now receives the initialization command from the first participant. Unless this second participant is the last, i.e., the Nth participant, it also sends the first position signal back to the bus master and to the first participant. The first participant then increments its counter. The bus master also increments its counter.
[0011] The process described above is repeated for each participant downstream, with the exception of the last participant. Each of these participants sends an initial position signal to the bus master and to all participants connected upstream in series, which then increment their counters accordingly.
[0012] The last, or Nth, participant also receives the initialization command from the penultimate participant, but sends a second position signal via the communication return channel to all upstream participants and the bus master. This second communication signal is not used by these other participants to increment their respective counter readings; rather, these counter readings remain unchanged. Based on the receipt of the second position signal, the bus master recognizes that the initialization command it sent has now gradually reached the last participant, thus completing this part of the initialization process.
[0013] At the end of this process, each participant now has a counter reading that is different from the counter readings of the other participants. In the example where all participants have a counter reading of zero at the beginning of the process and the increment is one, the counter reading of the Nth participant is 1, the counter reading of the second-to-last participant is 2, and so on, with the first participant connected to the bus master having a counter reading of N. Thus, all participants are now identified and specified in terms of their position within the sequence of participants connected to the communication bus, so that they can now be addressed by the bus master using the information identified by their counter readings.
[0014] As previously described, it can therefore be provided that the bus master has information regarding the number N of participants connected to the communication bus and that, upon receiving a second position signal, the bus master compares its counter reading or the number of increments of its counter reading with the number N of participants and issues an error message or repeats the initialization if the counter reading or the number of increments of the counter reading does not match the number N of participants.
[0015] The method according to the invention is characterized by a simple structure and a simple protocol for the initialization routine. The entire auto-addressing process is carried out by a single, sequential transmission of the initialization command from the bus master to the first participant, and subsequently from participant to participant downstream until the last participant. Feedback is provided by sending first position signals from all participants except the last participant, and a second position signal from the last participant to all upstream participants and the bus master, via a communication return channel. This return channel can be part of the communication bus for communication from the bus master to the participants, or it can be implemented via a separate line.
[0016] As mentioned above, each participant typically has an input with a terminating resistor and a voltage comparator. When the initialization command is sent from one participant to the next, a signal is output from the voltage comparator indicating whether the voltage across it is less than or equal to one, or greater than the reference voltage. This indicates whether the participant in question is the Nth and therefore last participant. The advantage of this participant configuration is that a simple voltage comparator, with only a single comparison threshold, can determine whether the participant is the last participant in the series or one of the participants upstream of the last participant in the series.The reference voltage is determined based on the voltage drop across the terminating resistor when the initialization command is sent from one participant to the next downstream participant.
[0017] A problem with daisy-chain communication bus systems such as the one according to the invention is that the failure of one participant can prevent the participants located upstream of that failed participant from being addressed. In such cases, it is advantageous if the communication bus provides bypass options to allow communication with participants located downstream of the defective participant, bypassing it, so to speak. Examples of such bypass options are described in EP-A-3 264 680, WO-A-2009 / 040015, WO-A-2017 / 125440, WO-A-2018 / 114937 and US-A-2007 / 0025240. Another bypass method that can also be used within the scope of this invention is described in European patent application 20 217 497.5 dated December 29, 2020, whereby the subject matter of said European patent application is hereby incorporated into the content of the present patent application by reference.
[0018] In a further expedient embodiment of the invention, defective participants are detected by, that each participant performs a self-test for functionality before the bus master sends the initialization command to the first participant, thus determining whether it is intact or defective; that the initialization command is forwarded on the communication bus past the defective participant to the nearest intact participant downstream of the defective participant, as viewed from the bus master; that an intact participant upstream of a defective participant recognizes that its said downstream neighboring participant is defective, and upon receiving the initialization command, sends a second position signal to all upstream participants and to the bus master; and that the bus master recognizes, based on prior information about the number N of participants connected to the bus master and the number of received first and second position signals,how many intact and thus identified participants, as well as participants specified with regard to their position within the sequence of intact participants, are connected to the communication bus.
[0019] The bus master counts the number of received first position signals as well as the number of received second position signals. If the bus master receives a second position signal at a time when the total number of position information signals it has received, including the second position signal just received, is less than the number N of participants, the bus master recognizes that this second position signal cannot originate from the last participant in the series. In such a case, the bus master further recognizes that there must be a defective participant downstream of the participant from which the second position signal originates and registers for each such second position signal that one (possibly further) of the N participants is defective.This detection of the number of defective participants becomes non-specific in those cases, which are very unlikely in practice, where at least two adjacent participants are defective or the last participant is defective.
[0020] This procedure effectively "marks" the defective participants. For example, if the communication bus system has a defective participant, the bus master receives the second position signal a total of two times during the initialization routine according to the invention. Since the bus master "knows" how many participants the communication bus system has, it will not terminate the process upon first receiving the second position signal, but only when the total number of received first and second position signals equals the number N of participants. The defective participants remain passive with regard to incrementing their counter values; that is, they do not process the position signals they receive from the downstream participants. The functioning participants, as described above, process only the first position signals in such a way that they increment their counter values.At the end of the initialization routine according to the invention, all intact participants again have different counter values, so that here too the identification and specification of the intact participants with regard to their position within the sequence of intact participants is given.
[0021] In a further advantageous embodiment of the invention, the bridging of defective participants within the communication bus system can be achieved, for example, by assigning each participant in the communication bus a bypass switch unit with one or more switches, via which, in a first switching state, communication and the transmission of position information take place without involving the participant, and in a second switching state, communication and the transmission of position information take place with the participant.
[0022] In a further advantageous embodiment of the invention, it can be provided that the terminating resistor in each participant can be activated or deactivated by means of a test switch, and that the terminating resistor is deactivated in the case of a defective participant by switching off the test switch and activated in the case of an intact participant by switching on the test switch.
[0023] As described above, the communication bus system has a communication return channel through which the individual participants send status or position signals to their upstream neighbors and to the bus master. In a preferred embodiment of the invention, the communication bus can be provided with a differential two-wire bus, operating at a common-mode level, for transmitting differential signals in a first communication direction from the bus master to the participants, and a return channel for transmitting signals in a second communication direction, opposite to the first, from the participants to the bus master.
[0024] The previously mentioned return channel can be implemented as a single-wire line or by modulating the common-mode level of the two-wire bus.
[0025] In the case of modulating the common-mode level to use the differentially operated two-wire bus as a return channel, the procedure described in European patent application 21 153 488.8 dated January 26, 2021, can also be followed, and the subject matter of said European patent application is hereby incorporated into the present patent application by reference. Alternative methods for implementing the return channel are described, for example, in US-A-5,485,488 and US-B-6,813,483.
[0026] Finally, the initialization command can be used in each (intact) participant to calibrate various electronic components, such as a frequency divider to provide the (sampling) frequency of the sampling signal for sampling the incoming data bitstream and for generating the (output) data bitstream to be sent from one participant to the next participant.
[0027] The invention is explained in more detail below with reference to an exemplary embodiment and the drawing. Specifically, the drawing shows: Fig. 1 shows an exemplary setup of a participant in a daisy-chain communication bus system according to, for example, the LVDS standard; Fig. 2 shows the signal flow on the receive and transmit sides of a participant upon receipt of the initialization command (calibration frame) and on the return channel; Figs. 3a) to 3d) show the sequence of the initialization routine for the example of a communication bus system with the bus master and three participants, all of which are intact; and Figs. 4a) to 4c) show an example of a communication bus system with a bus master and three participants, one of which is defective.
[0028] Fig. 1Figure 10 schematically shows the main hardware components of a participant 10 in a daisy-chain communication bus system, which is connected to a communication bus 12 configured as a differential two-wire bus 14. Participant 10 has an input 16 and an output 18. A receiver 20 is located at input 16, while a transmitter 22 is located at output 18. Between the two is a data and signal processing unit 24 for evaluating the received signals, generating the signals to be sent, and controlling an application such as an RGB lighting unit. Fig. 1 not shown.
[0029] Parallel to input 16, participant 10 has a terminating resistor 26 and, in series with this, a test switch 28. A self-test performed by participant 10 before address assignment determines whether participant 10 is functioning correctly or defective. If participant 10 is not functioning correctly, i.e., defective, the test switch 28 remains open. If participant 10 is functioning correctly, i.e., intact, the test switch 28 is closed, thus connecting this participant to its input 16 via the terminating resistor 26.
[0030] At output 18, participant 10 can detect a voltage drop if it sends a signal via communication bus 12 within the duration of the initialization command that participant 10 sends to its downstream neighbor, provided that said participant 10 is not the last participant downstream in the series connection or is followed downstream by an intact participant. The voltage drop is detected by means of a voltage comparator 30, which compares the voltage at output 18 with a reference voltage 32 defined by the magnitude of the current in communication bus 12 and the value of the terminating resistor 26. The comparison signal from the comparator 30 is fed to the data and signal processing unit 24.
[0031] In Fig. 1The two bridging resistors 41 indicate that, in the event that participant 10 is defective, the communication, and in particular the calibration frame 33, bypasses transmitter 22, receiver 20, and data and signal processing unit 24 of the defective participant 10 and is forwarded downstream on the communication bus to the next intact participant 10. Other methods for bypassing a defective participant are known and can be used within the scope of the invention.
[0032] Fig. 2The signal timing diagram for participant 10 is shown. During the initialization phase, each functioning participant 10 receives an RX signal, which is a calibration frame 33. The level on the communication bus 12 is constant, for example, equal to the logic 1 or logic 0 level. The length of the calibration frame 33 is greater than the measurement time 34 required to perform the previously described voltage comparison at the output 18 of participant 10 using the voltage comparator 30. The calibration latency 36 of the output signal TX at the output 18 of participant 10 is therefore chosen accordingly. The data and signal processing unit 24 then generates a position information signal 38, which is transmitted to a return channel 40 (see also Fig. 1 ) is given, to which each participant 10 and the bus master are connected.
[0033] In the Figs. 3a) to 3dFigures 4a) and 4c) show two scenarios for the inventive procedure for the auto-addressing of participants in communication bus systems, with the example of the Figs. 3a) to 3d ) all participants are intact, whereas in the case of the Figs. 4a) to 4c ) one of the participants is defective. The different counter readings of the participants and the bus master, which occur in the individual phases, are shown in the figures.
[0034] Fig. 3a ) shows the initial situation in an exemplary communication bus system with bus master 42 and three participants 44, 46 and 48, all of which are intact.
[0035] The bus master 42 sends the calibration frame to the first participant 44, which then increments an internal counter to 1 and sends a first position signal 50 back to the bus master, whereupon the latter increments an internal counter to 1 (see Fig. 3b )). According to Fig. 3c) participant 44 now sends the calibration frame to the next participant 46 located downstream, which also sends back a first position signal 50 via the return channel 40, in this case to the upstream neighboring participant 44 and the bus master 42, which each increase their counter values by one, while participant 46 itself sets its counter to 1.
[0036] In Fig. 3dFigure 1 shows how the second participant, 46, sends the calibration frame to the next participant downstream, 48, which then sets its counter to 1. Based on the comparison using its voltage comparator 30, participant 48 recognizes that either there is no further participant downstream, meaning it is the last participant, or a defective participant follows. Therefore, it sends the second position signal via the return channel 40 to the bus master 42 and all participants upstream of participant 48 (in this case, participants 44 and 46). These participants 44, 46, and the bus master 42 increment their counters, so that the bus master now has a counter reading of 3, the first participant 44 has a counter reading of 3, the second participant 46 has a counter reading of 2, and the third participant 48 (the last participant) has a counter reading of 1. Since the counter reading of the bus master 42 now equals the number of participants, the process is complete.
[0037] In the example according to Fig. 4 In addition to the bus master 42, the communication bus system has three participants 44, 46, 48, but participant 46 is defective.
[0038] At the beginning, bus master 42 again sends the calibration frame to the first participant 44, which recognizes that the next participant 46 downstream is defective, based on a comparison using its voltage comparator 30. It then sends the second position signal 52 via the return channel 40 and sets its counter to 1. Bus master 42 recognizes that it has received fewer position information signals than there are participants and sets its counter to 1. Furthermore, bus master 42 now knows that the next participant 46 is defective. The calibration frame is then sent by the first participant 44, past the defective participant 46, to the last participant 48 in this case. Since it is functioning correctly, 48 sets its counter to 1 and sends back the second position signal 52. This second position signal 50 is received by the first participant 44 and by bus master 42, whereupon both increment their counters.Busmaster 42 now recognizes that it has received a total of two position signals and "knows" that one of the participants is defective. Thus, busmaster 42 now has information about all participants connected to the communication bus, and the process is complete. REFERENCE MARK LIST
[0039] 10 Participant 12 Communication bus 14 Two-wire bus 16 Input 18 Output 20 Receiver 22 Transmitter 24 Data and signal processing unit 26 Termination resistor 28 Test switch 30 Voltage comparator 32 Reference voltage 33 Calibration frame 34 Measurement time 36 Calibration latency 38 Position information signal 40 Return channel 41 Bypass resistor 42 Bus master 44 Participant 46 Participant 48 Participant 50 First position signal 52 Second position signal
Claims
1. A method of initializing a serial communication bus system in which a bus master and a number N of subscribers, with N as a natural number greater than or equal to 2, are connected to a communication bus and the subscribers are interconnected through the communication bus by a first subscriber being connected to the bus master and a second subscriber being connected to the first subscriber and so on until the N-th, i.e. last subscriber which is connected to the penultimate subscriber, in which method - the bus master sends an initialization command to the first subscriber (44) connected to the bus master (42), - the first subscriber receives the initialization command, increments a counter, forwards the initialization command to the second subscriber (46) connected thereto and transmits position information to the bus master (42) via the communication bus (12), which position information is a first position signal (50) indicating that the first subscriber (44) is not the N-th subscriber connected to the communication bus (12) and thus not the last subscriber (48), - the bus master (42) receives the first position signal (50) from the first subscriber (44) and increments a counter, - from the second subscriber (46) to the N-th subscriber for each i-th subscriber, where i = 2, 3, ..., N, it is proceeded such that - the i-th subscriber receives the initialization command from the (i-1)-th subscriber, increments a counter and transmits position information to the bus master (42) and to the first subscriber (44) up to the (i-1)-th subscriber, which position information is the first position signal (50) if the i-th subscriber is not the N-th subscriber and thus not the last subscriber, and which position information is a second position signal (52) if the i-th subscriber is the N-th and thus the last subscriber, - each of the subscribers from the first subscriber (44) to the (i-1)-th subscriber only increments its counter when the first position signal (50) is received, - the bus master (42) increments its counter with each reception of a first position signal (50), and - this process is completed when the bus master (42) receives the second position signal (52) from the N-th subscriber, and - at the end of this process, each subscriber has a counter reading that is different from the counter readings of the other subscribers, which identifies it and specifies its position within the sequence of subscribers connected to the communication bus (12).
2. The method according to claim 1, characterized in that the bus master (42) has information relating to the number N of subscribers connected to the communication bus (12), and in that the bus master (42), after receiving a second position signal (52), compares its counter reading or the number of increments of its counter reading with the number N of subscribers and outputs an error message or repeats the initialization if the counter reading or the number of increments of the counter reading does not match the number N of subscribers.
3. The method according to claim 1 or 2, characterized in that the counter readings of all subscribers are the same at the beginning of the initialization and in particular have the value 0 and in that the incrementation of each counter is the same and in particular has the value 1.
4. The method according to any one of claims 1 to 3, characterized in that each subscriber has an input with a terminating resistor (26) and furthermore a voltage comparator (30) from which, when the initialization command is sent from one subscriber to the next subscriber, a signal is output which indicates whether a voltage is present at the voltage comparator (30) which is less than or equal to or greater than a reference voltage, thereby indicating whether said subscriber is the N-th and thus the last subscriber.
5. The method according to any of claims 1 to 4, characterized in that - that before the bus master (42) sends the initialization command to the first subscriber (44), each subscriber performs a self-test for functionality and thus determines whether it is intact or defective, - that the initialization command is forwarded on the communication bus (12) past a defective subscriber to the next intact subscriber arranged downstream of the defective subscriber as viewed from the bus master (42), - an intact subscriber arranged upstream of a defective subscriber recognizes that its said subscriber arranged adjacently downstream in the vicinity is defective and, on receipt of the initialization command, transmits a second position signal (52) to all subscribers arranged upstream and to the bus master (42), and - the bus master (42) uses prior information about the number N of subscribers connected to the bus master (42) and the number of received first position signals (50) and second position signals (52) to recognize how many intact and thus identified subscribers and subscribers specified with regard to their position within the sequence of intact subscribers are connected to the communication bus.
6. The method according to claim 5, characterized in that each subscriber in the communication bus (12) is assigned a bypass switch unit with one or more switches via which, in a first switching state, communication and transmission of position information takes place without the involvement the subscriber and, in a second switching state, communication and the transmission of position information take place with the involvement of the subscriber.
7. The method according to one of claims 4 to 6, characterized in that the terminating resistor (26) can be activated or deactivated in each subscriber by means of a test switch (28) and in that the terminating resistor (26) is deactivated in the case of a defective subscriber by switching off the test switch (28) and is activated in the case of an intact subscriber by switching on the test switch (28).
8. The method according to one of claims 1 to 7, characterized in that the communication bus (12) comprises a differential two-wire bus (14) to be operated at a common-mode level for transmitting differential signals in a first communication direction from the bus master (42) to the subscribers and a return channel (40) for transmitting signals in a second communication direction opposite to the first communication direction from the subscribers to the bus master (42).
9. The method according to claim 8, characterized in that the return channel (40) is implemented as a single-wire line or by modulation of the common-mode level of the two-wire bus (14).