CIRCUIT FOR A BUS SYSTEM AND METHOD FOR OPERATING A CIRCUIT
Patent Information
- Application Number
- DE502019012042
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-04-06
- Filing Date
- 2019-03-21
- Publication Date
- 2024-09-26
- Estimated Expiration
- 2039-03-21
AI Technical Summary
Long-lasting oscillations in bus voltage due to improper termination or topology lead to error-prone data transmission, especially with increased transmission rates, and existing solutions like masking oscillations or on-chip termination are inadequate.
A circuit with a measurement, detection, and resistance circuit that adjusts the resistance between bus connections to maintain a minimum impedance of 50 ohms, stabilizing communication by dynamically determining and setting a second resistance value based on measured conditions, including a time window and number of subscriber stations.
This solution effectively stabilizes bus system communication by ensuring a minimum impedance, reducing oscillations and improving robustness, thereby maintaining reliable data transmission even at higher transmission rates.
Description
State of the art
[0001] The invention relates to a circuit for a bus system and a method for operating a circuit for a bus system.
[0002] It is well known that prolonged oscillations in a bus system's bus voltage caused by improper termination or incorrect bus system topology are significant factors that can lead to error-prone data transmission. A reduction in bit time due to increased transmission rates is particularly problematic in this regard.
[0003] To compensate for voltage fluctuations, it is known from DE 10 2015 222 334 A1 that bus oscillations are selectively masked during data reception. A masking element is provided for masking bus signal oscillations for a predetermined masking time if a monitoring result indicates that oscillations exceed a difference in the bus signal after a transition of the bus signal from a dominant to a recessive state by at least a predetermined threshold.
[0004] JP H06 152610 A discloses a bus system in which a terminating resistor is adjusted depending on a measured impedance. EP 1 202 451 A2 discloses an on-chip termination of transmission lines, which enables the termination of transmission lines using on-chip resistors configured to form networks whose resistances are related to the resistance of an external reference resistor. WO 2015 / 185057 A1 discloses a bus system with at least three control units for communication purposes, wherein each control unit is assigned a bus terminating resistor with a predetermined resistance value for adapting a control unit resistance to a bus system resistance. US 2010 / 177829 A1 discloses a receiver with an impedance control circuit. The impedance control circuit changes an input impedance based on a detected value. Disclosure of the invention
[0005] The problems of the prior art are solved by a circuit according to claim 1 and a method according to a subordinate claim. Advantageous further developments are specified in the subclaims and in the following description of exemplary embodiments. According to a first aspect of this description, a circuit for a bus system is provided. The circuit comprises: a measuring circuit configured to measure a first resistance value between two bus-side terminals of the circuit; a determination circuit configured to determine a second resistance value as a function of the first resistance value; and a resistance circuit configured to set a resistor switchable between the two bus-side terminals to the second resistance value.Advantageously, setting the resistor to the second resistance value ensures that the first resistance value measured at the bus-side terminals—assuming the resistor of the resistor circuit is activated with the second resistance value—is within a range where communication via the bus system is maintained. In particular, adjusting the resistance value of the resistor ensures that a minimum value for the first resistance value, for example, 50 ohms, is not undercut.
[0006] An advantageous embodiment is characterized in that the detection circuit is configured to increase the second resistance value when the first resistance value decreases. This increase in the second resistance value advantageously stabilizes the first resistance value, which improves the robustness of communication via the bus system.
[0007] The measuring circuit is configured to determine at least one time window as a function of a message received via the two bus-side connections and as a function of an a priori known position relative to the received message. The resistance circuit is configured to set the resistance connected between the two bus-side connections to the last determined second resistance value during the determined time window. The measuring circuit is configured to wait for a waiting period after the start of the time window and, following the waiting period and before the end of the time window, to measure the first resistance value between the two bus-side connections during a measuring period. The a priori known position in the message advantageously prevents negative effects on communication.
[0008] An advantageous embodiment is characterized by the length of the waiting period and / or the measurement period being one bit time or shorter. With a correctly configured bus system, it can be assumed that the signal propagation time is shorter than the bit time. The minimum bit time specification for the measurement period and the waiting period advantageously reduces negative effects on the measurement of the first resistance due to high signal propagation times in the bus system.
[0009] An advantageous embodiment is characterized in that the resistance circuit is configured to determine the time window for switching on the resistance and to switch on the resistance during the time window with the most recently determined second resistance value, and wherein the measuring circuit is configured to determine the first resistance during the time window. Advantageously, the measurement is performed during the actual vibration damping, whereby the second resistance value is determined depending on the actual operation or the actual switching on for vibration damping. This allows the second resistance value to be more precisely adjusted to the desired damping effect.
[0010] An advantageous embodiment is characterized in that the determination circuit is configured to determine the second resistance value based on a comparison of the first resistance value with a target value for the first resistance value. Advantageously, a control loop is created that ensures that the bus system independently finds a value for the total resistance in order to implement ringing suppression.
[0011] An advantageous embodiment is characterized in that the determination circuit is configured to determine the second resistance value using a lookup table as a function of the first resistance value. The lookup table makes it easy to find the appropriate second resistance value.
[0012] An advantageous embodiment is characterized in that the circuit comprises: a configuration circuit configured to provide a number of subscriber stations of the bus system; and the determination circuit configured to determine the second resistance value using the lookup table as a function of the first resistance value and as a function of the provided number of subscriber stations. By taking the number of subscriber stations into account, the second resistance value is adapted to the actual bus configuration. In particular, this prevents critical operating conditions, which prevent a significant drop in the first resistance value, in particular below the limit of 50 ohms.
[0013] A further aspect of the description relates to a transceiver for a subscriber station of a bus system, wherein the transceiver comprises the circuit according to the first aspect.
[0014] A further aspect of the description relates to a method for operating a circuit for a bus system, the method comprising: measuring a first resistance value between two bus-side terminals of the circuit; determining a second resistance value as a function of the first resistance value;and setting a resistor that can be switched between the two bus-side connections to the second resistance value, wherein at least one time window is determined as a function of a message received via the two bus-side connections and as a function of an a priori known position in relation to the received message, wherein the resistor switched between the two bus-side connections is set to the last determined second resistance value during the determined time window, and wherein a waiting period is waited after a start of the time window in order to measure the first resistance value between the two bus-side connections during a measuring period following the waiting period and before the end of the time window;
[0015] The figures show: Figures 1, 2a, 2b each show a circuit in schematic form; Figure 3 shows a schematic protocol diagram; Figures 4a, 4b each show a schematic block diagram; and Figure 5 shows an exemplary bus system in schematic form.
[0016] Figure 1 shows a circuit 100 for a bus system. The circuit 100 comprises a measuring circuit 101, a detection circuit 102, and a resistance circuit 104. The measuring circuit 101 and the resistance circuit 104 are arranged in parallel between two bus-side terminals 106 and 108 of the circuit 100. The circuit 100 is connected to a first bus line CAN_H via terminal 106. The circuit 100 is connected to a second bus line CAN_L via terminal 108. A voltage V_DIFF drops between the two terminals 106 and 108.
[0017] The measuring circuit 101, the detection circuit 102, and the resistance circuit 104 are embodied, for example, as an ASIC, FPGA, or as a discrete circuit. Furthermore, the measuring circuit 101, the detection circuit 102, and the resistance circuit 104 comprise, for example, a processor equipped with software to execute the respective software-defined functions. Of course, mixed forms comprising a physical circuit and the processor on which the software is executed are also conceivable. The software is stored on a corresponding memory element. The circuit 100 is, for example, part of a transceiver for a subscriber station of a bus system. In another embodiment, the circuit 100 is implemented in addition to an existing transceiver.
[0018] Shown schematically, the resistance circuit 104 comprises a switch 110 and a resistor 112 arranged in series therewith. Of course, the resistance circuit 104 can also be implemented differently and, for example, comprise a MOSFET. The resistor 112 is connected, for example, between the two bus-side terminals 106, 108 when a state transition from a first state (e.g., dominant) of an absolute value of the voltage V_DIFF to a second state (e.g., recessive) occurs, for example, within a determined time window. The resistance circuit 104 serves to suppress or dampen oscillations of the voltage V_DIFF.
[0019] The measuring circuit 101 determines a first resistance value R1 between the two bus-side connections 106 and 108. The determination of the first resistance value R1 occurs, for example, at regular intervals. For example, the determination can be performed in every data frame or only once per minute. This first resistance value R1 reflects the total resistance connected between the two connections 106 and 108, which results, for example, from the parallel connection of a bus resistor Rb and the resistor 112. The determination circuit 102 determines a second resistance value R2 for the resistor 112 of the resistance circuit 104 depending on the supplied first resistance value R1. When the circuit starts, a predefined value for the second resistance value R2 is used. The second resistance value R2 is supplied to the resistance circuit 104 in order to set the resistor 112 to the second resistance value R2.The resistance circuit 104 switches the resistor 112 between the two terminals 106 and 108 either on external request or independently, whereby the resistor 112 is set to the last determined resistance value R2.
[0020] Figure 2ashows the circuit 100, wherein the measuring circuit 101 activates the resistance circuit 104 by means of a signal S1 so that the resistance connected between the two terminals 106, 108 is also measured during the subsequent measurement. The measuring circuit 101 determines at least one time window as a function of a message that is received via the bus or that is sent on the bus, and as a function of a previously known position in relation to the message. Knowledge of the protocol is used for this purpose; in particular, the presence of a message and its temporal position are determined as a function of the voltage V_DIFF. The resistance circuit 100 is then operated using the signal S1 such that the second resistance value R2 is set for the resistance connected between the terminals 106, 108 during the determined time period.After the resistor is inserted, a waiting period is waited for, and then the first resistance value is measured using measuring circuit 101 during a measuring period. During the measuring period, a curve of the first resistance value is determined, and the minimum of the curve is output as the first resistance value. For example, both the waiting period and the measuring time are a nominal bit time long, because approximately 70% of the nominal bit time consists of a round-trip time, which must be waited for. In another example, both the waiting period and the measuring time are shorter than the nominal bit time.
[0021] A configuration circuit 202 provides a number 204 of subscriber stations of the bus system. The number 204 can either be preconfigured or the configuration circuit can independently determine the number 204 of subscriber stations. To independently determine the number 204, the configuration circuit 202 exchanges messages with other bus subscribers. For example, the determination circuit 102 can determine the second resistance value R2 to be lower for an increased number 204 than for a reduced number 204.
[0022] Figure 2b shows the circuit 100. In contrast to the Figure 2aA signal S2 is transmitted from the resistance circuit 104 to the measuring circuit 101. The resistance circuit 104 independently determines the time window for connecting the resistor. Determining the time window can be considered a basic function for the operation of the resistance circuit. The signal S2 signals the measuring circuit 101 that the resistor is connected; thus, the time window is transferred to the measuring circuit 101. As long as the signal S2 signals the connection of the resistor, the measuring circuit performs a measurement of the first resistor.
[0023] Figure 3shows the structure of a CAN message and the chronological order of the measurement of the first resistance value. The message shown includes the following fields: Start of frame (SOF), Message Identifier (MID), Remote Transmission Request (RTR), Control field (CONTROL), Data field (DATA), CRC field (CRC), Acknowledge field (ACK), End of frame (EOF). For example, at the beginning of the third bit B3, the resistance of the resistance circuit 104 is switched on in order to measure the first resistance value in the subsequent fourth bit B4. Alternatively or additionally, the resistance of the resistance circuit is switched on and the first resistance value is measured within the intermission field, which is located between the end of frame EOF and the start of frame SOF. The third and fourth bits B3, B4, as well as the intermission field, are particularly well suited for switching on the resistance of the resistance circuit 104 due to the recessive bus level.
[0024] Figure 4a shows the detection circuit 102 in a schematic section. A block 402 generates a setpoint R1s and feeds it to an addition point 404. The measured first resistance value R1 is subtracted from the setpoint R1s at the addition point 404 to determine a control difference d. A controller 406 determines the second resistance value R2 as a function of the control difference d, which in this case functions as the manipulated variable. The controller 406 can be, for example, a PID controller or a controller of another design.
[0025] Figure 4bshows the determination circuit 102 in a schematic section. The configuration circuit 202 provides the number 204 of bus devices to a block 410. Block 410 includes a lookup table that determines the second resistance value R2 depending on the number 204 and the first resistance value R1. The lookup table is stored in a memory element. An even simpler variant is also conceivable in which the resistance R2 is determined depending on the resistance R1 using block 410, which contains a lookup table.
[0026] Figure 5shows an exemplary configured bus system comprising two subscriber stations 502, 504. Each of the subscriber stations 502, 504 comprises the respective circuit 100, which is connected with the first connection 106 to the first bus line CAN_H and with the second connection 108 to the second bus line CAN_L. The bus lines CAN_H and CAN_L are connected to one another at their ends via a respective terminating resistor Rb1 and Rb2. By switching the resistor between the bus-side connections 106, 108 on and off, the respective circuits 100 of the subscriber stations 502 and 504 cause oscillations to be dampened and thus reduced during a state change from dominant to recessive. The bus system 500 operates according to the CAN standard, such as ISO11898, according to the exemplary embodiments. However, the circuit 100 and the operation of the circuit can easily be transferred to other bus systems.Other bus topologies are also conceivable.
Claims
1. Circuit (100) for a bus system, wherein the circuit (100) comprises: - a measuring circuit (101) that is configured to measure a first resistance value between two bus-side connections (106, 108) of the circuit (100); - an ascertainment circuit (102) that is configured to ascertain a second resistance value on the basis of the first resistance value; and - a resistance circuit (104) that is configured to set a switchable resistor between the two bus-side connections (106, 108) to the second resistance value, characterized in that the measuring circuit (101) is configured to ascertain at least one time window depending on a message received via the two bus-side connections (106, 108) and depending on a position, which is known a priori, with respect to the received message, wherein the resistance circuit (104) is configured to set the resistor connected between the two bus-side connections (106, 108) to the last ascertained second resistance value during the ascertained time window, and wherein the measuring circuit (101) is configured to wait for a waiting period after the start of the time window, and to measure, following the waiting period and before the end of the time window, the first resistance value between the two bus-side connections (106, 108) during a measurement period.
2. Circuit (100) according to Claim 1, wherein the ascertainment circuit (102) is configured to increase the second resistance value if the first resistance value falls.
3. Circuit (100) according to Claim 1, wherein the length of the waiting period and / or the measurement period is a bit time or shorter.
4. Circuit (100) according to one of the preceding claims, wherein the resistance circuit (104) is configured to ascertain a time window for connecting in the resistor, and to connect in the resistor during the time window with the last ascertained second resistance value, and wherein the measuring circuit (101) is configured to ascertain the first resistor during the time window.
5. Circuit (100) according to one of the preceding claims, wherein the ascertainment circuit (102) is configured to ascertain the second resistance value on the basis of a comparison between the first resistance value and a target value for the first resistance value.
6. Circuit (100) according to one of Claims 1 to 4, wherein the ascertainment circuit (102) is configured to ascertain the second resistance value, by means of a lookup table, on the basis of the first resistance value.
7. Circuit (100) according to Claim 6, wherein the circuit (100) comprises: - a configuration circuit (202) that is configured to provide a number (204) of subscriber stations of the bus system; and - the ascertainment circuit (102) that is configured to ascertain the second resistance value, by means of the lookup table, on the basis of the first resistance value and on the basis of the provided number (204) of subscriber stations.
8. Transceiver for a subscriber station of a bus system, wherein the transceiver comprises the circuit (100) according to one of Claims 1 to 7.
9. Method for operating a circuit (100) for a bus system, wherein the method comprises: - measuring (101) a first resistance value between two bus-side connections (106, 108) of the circuit (100); - ascertaining (102) a second resistance value on the basis of the first resistance value; and - setting (104) a switchable resistor between the two bus-side connections to the second resistance value, characterized in that at least one time window is ascertained depending on a message received via the two bus-side connections (106, 108) and depending on a position, which is known a priori, with respect to the received message, wherein the resistor connected between the two bus-side connections (106, 108) is set to the last ascertained second resistance value during the ascertained time window, and wherein a waiting period after the start of the time window is waited for, in order to measure, following the waiting period and before the end of the time window, the first resistance value between the two bus-side connections (106, 108) during a measurement period.
