Techniques for correcting time parameters

文档序号:425866 发布日期:2021-12-21 浏览:17次 中文

阅读说明:本技术 用于修正时间参数的技术 (Techniques for correcting time parameters ) 是由 马丁·斯特里韦 维杰斯拉夫·梅塞尼克 于 2020-05-13 设计创作,主要内容包括:本发明描述一种用于根据第二节点修正第一节点中的时间参数(115;125)的技术。所述技术的装置方面包括时钟脉冲发生器单元(110),其在第一节点中提供周期性的时钟脉冲。外围单元(120)对从第二节点异步传输的报文的符号进行解码,并且在报文的相继符号的符号序列的传输期间测量时钟脉冲的数目(124)。修正单元(130)根据测得的时钟脉冲的数目(124)与符号序列中相继符号的数目的比例来修正时间参数(115;125)。(A technique for modifying a time parameter (115; 125) in a first node based on a second node is described. A device aspect of the technique includes a clock generator unit (110) that provides periodic clock pulses in a first node. The peripheral unit (120) decodes symbols of the message asynchronously transmitted from the second node and measures the number of clock pulses (124) during transmission of a sequence of symbols of successive symbols of the message. A correction unit (130) corrects the time parameter (115; 125) in dependence on a ratio of the measured number of clock pulses (124) to the number of successive symbols in the symbol sequence.)

1. An apparatus (100) for modifying a time parameter (115; 125) in a first node (320) in dependence on a second node (310; 320), comprising:

a clock pulse generator unit (110) adapted to provide periodic clock pulses in the first node (320);

a peripheral unit (120) adapted to decode symbols of a message (400) asynchronously transmitted from the second node (310; 320) and to measure a number of clock pulses (124) during transmission of a sequence of symbols (406) of successive symbols of the message (400); and

a correction unit (130) adapted to correct the time parameter (115; 125) in dependence on a ratio of the measured number of clock pulses (124) to the number of consecutive symbols in the sequence of symbols (406).

2. The apparatus of claim 1, wherein the time parameter (115; 125) comprises a clock rate (115) of the clock pulse generator unit (110), the decoded symbol rate (125), a parameter for controlling the clock rate (115) or a parameter for controlling the symbol rate (125).

3. The apparatus according to claim 1 or 2, wherein sampling of a message (400) transmitted from the second node, or decoding of symbols of the message (400), is clock synchronized by the clock pulse generator unit (110) and/or controlled by the time parameter.

4. The apparatus according to any of claims 1 to 3, wherein the peripheral unit (120) comprises a first serial interface (121) for asynchronously transmitting messages (400) from the second node (310; 320) and a second serial interface (126) for asynchronously transmitting messages (400) to a third node (310; 320), and wherein the first interface (121) and the second interface (126) are both clocked by the clock pulse generator unit (110) and/or controlled by a modified time parameter (115; 125).

5. The apparatus according to any of claims 1 to 4, wherein the time parameter (115; 125) comprises a clock rate (115) of the clock pulse generator unit (110), and the correction unit (130) is adapted to correct the clock rate (115) of the clock pulse generator unit (110) based on a ratio of the measured number (124) of clock pulses to the number of consecutive symbols in the sequence of symbols (406).

6. The apparatus of claim 5, wherein the correction to the corrected clock rate (115) is a quotient of a predetermined number of clock pulses per symbol and the measured ratio compared to an actual clock rate of the clock pulse generator unit (110).

7. The device according to any of claims 1 to 6, wherein the time parameter (115; 125) comprises a symbol rate (125) of the peripheral unit (120), and the correction unit (130) is adapted to correct the symbol rate (125) of the peripheral unit (120) according to a ratio of the measured number of clock pulses (124) to the number of consecutive symbols in the symbol sequence.

8. The apparatus of claim 7, wherein the correction to the corrected symbol rate (125) is a quotient of the measured ratio and a predetermined number of clock pulses per symbol, as compared to a predetermined systematic symbol rate.

9. The apparatus according to any of claims 1 to 8, wherein the time parameter (115; 125) comprises a divisor of a symbol rate (125) for the peripheral unit (120) relative to a clock rate (115) of the clock pulse generator unit (110), and the correction unit (130) is adapted to correct the divisor (125) according to a ratio of a measured number of clock pulses (124) to a number of consecutive symbols in the symbol sequence.

10. The apparatus of claim 9, wherein the modified divisor is equal to or proportional to the measured ratio.

11. The apparatus according to any of claims 1 to 10, wherein the symbol sequence (406) of successive symbols of the message (400) extends from a first falling edge to a first rising edge of the transmission of the message (400).

12. The device according to any of claims 1 to 11, wherein the microcontroller comprises said clock pulse generator unit (110), said peripheral unit (120) and said correction unit (130), and wherein the microcontroller further comprises a capture-compare unit, to which signals of messages (400) received from said second node (310; 320) are applied, and adapted to measure the number of clock pulses (124) during transmission of said sequence of symbols (406).

13. The apparatus according to any of claims 1 to 12, wherein the sequence of symbols (406) of the message (400) comprises only symbols for transmitting valid data.

14. The apparatus according to any of the claims 1 to 13, wherein the symbol sequence (406) of the message (400) is shorter than one character (402; 404) of the message (400) and/or is part of the first character (402) of the message (400).

15. The device according to any of claims 1 to 14, wherein the peripheral unit (120) is further adapted to measure a number of clock pulses (124) during transmission of a predetermined synchronization character of the message (400), and wherein the correction unit (130) is further adapted to correct the time parameter (115; 125) based on a ratio of the measured number of clock pulses (124) to a predetermined number of symbols in the synchronization character, and/or based on a quotient of the measured number of clock pulses (124) during transmission of a synchronization character and a predetermined nominal number of clock pulses.

16. A method (200) of modifying a time parameter (115; 125) in a first node (320) in dependence on a second node (310; 320), wherein the method (200) comprises or causes the following steps:

providing (210) a periodic clock pulse in the first node (320);

decoding (220) symbols of a message (400) transmitted asynchronously from the second node (310; 320) and measuring the number of clock pulses (124) during transmission of a sequence of symbols (406) of successive symbols of the message (400); and

-modifying (230) the time parameter (115; 125) in dependence on a ratio of the measured number of clock pulses (124) to the number of successive symbols in the sequence of symbols (406).

Technical Field

The invention relates to the modification of time parameters in connected nodes. The invention relates in particular to a device and a method for correcting a time parameter in a first node in dependence on a second node.

Background

In many fields, the number of interconnected devices has increased dramatically. For example, devices that do not have a user interface of their own are increasingly interconnected. Interconnected devices that communicate at higher layers using the Internet Protocol (IP) are also referred to as the internet of things (loT). Regardless of the application, the presence or absence of a user interface, or the connection to a cloud service, the interconnected devices are referred to herein as nodes.

The physical layer of communication between nodes may include asynchronous data transfer without a clock line, for example, for installation, or to use an existing 2-wire line. Asynchronous data transmission implements a fieldbus. Whereby sensors and actuators in switch boxes, production equipment and vehicles can be interconnected. The field Bus used for this purpose is the Interbus and the so-called "Controller Area Network (Controller Area Network)" Bus (CAN-Bus). An example of an application is industrial production or autopilot, entitled "industrial 4.0". Asynchronous data transmission also enables field buses for interconnecting meters or heating devices in a home, for example for remote reading and home automation. For the latter, a standard measuring Bus of the EN 13757 series has been established (also known as "metering Bus" or M-Bus).

The term "asynchronous" is used here to refer to a data transmission format that is implemented, for example, by means of a start bit. In terms of an externally uniform system symbol rate, directly interconnected nodes need to be "synchronized" with each other. The latter is referred to herein as coherency (gleichging) to avoid conceptual confusion with asynchronous data transfers.

In order to maintain consistency during the transmission of at least one character from the start bit in asynchronous data transmission, each node needs to have a sufficiently accurate and stable clock pulse generator according to conventional schemes. Document US 3452330 a is described in this regard, for example. However, such a clock generator, such as a quartz crystal oscillator, increases the manufacturing cost and the power consumption of each node.

In order to maintain node consistency during clock synchronization by means of a low-power tank circuit, a stop bit is transmitted in the CAN Bus. But this reduces protocol efficiency and increases signal processing complexity in each node.

Disclosure of Invention

It is therefore an object of the present invention to provide a more efficient technique for achieving consistency of nodes that asynchronously transfer data.

The solution of the invention to achieve the object described above is an apparatus and a method having the features of the independent claims. Advantageous embodiments and applications of the invention are the subject matter of the dependent claims and will be described in detail hereinafter with reference to the drawings.

According to one aspect of the invention, an apparatus is provided for modifying a time parameter in a first node in accordance with a second node. The apparatus comprises a clock pulse generator unit adapted to provide periodic clock pulses in the first node. The apparatus further comprises a peripheral unit adapted to decode symbols of the message asynchronously transmitted from the second node and to measure the number of clock pulses during transmission of a sequence of symbols of successive symbols of the message. The device further comprises a correction unit adapted to correct the time parameter in dependence on a ratio of the number of measured clock pulses to the number of consecutive symbols in the sequence of symbols.

The time parameter may be a clock rate of a clock pulse generator, a decoded symbol rate, a control parameter for controlling the clock rate and/or a control parameter for controlling the symbol rate.

Embodiments of the apparatus are able to prevent decoding errors and/or termination in case of Drift (Drift) of the clock pulses of the clock pulse generator unit, e.g. as a function of temperature. By measuring the ratio, for example, a first deviation of the clock rate of the clock pulse generator unit and/or of the decoded symbol rate which does not yet hinder decoding can be determined and corrected or compensated for by the correction unit depending on the measured ratio. The correction of the time parameter can in particular directly correct or (for example completely or at least partially) compensate for deviations in the clock rate and/or the symbol rate.

In the presence of a second deviation greater than the first deviation, the same or a further embodiment of the device enables a further decoding and/or a further correction according to the invention on the basis of the time parameter corrected in response to the first deviation. Decoding errors or termination can be prevented. For example, the second deviation may be so large that, in the case of a time parameter which is not corrected in response to the first deviation, the decoding fails as a result of the second deviation, while according to the invention the decoding can be realized, for example because the deviation which disturbs the decoding is limited to the difference between the second deviation and the first deviation.

The detection (e.g. sampling) of the message transmitted from the second node and/or the decoding of the symbols of the message (e.g. based on sampled values) may be clocked by the clock pulse generator unit and/or configured by a time parameter. Once the time parameter is modified by the modification unit, detection and/or decoding can be performed immediately according to the modified time parameter. For example, the first message or the first character in the message may be the basis for correcting the time parameter by the correction unit. That is, successive symbols in the symbol sequence may be symbols of the first message or symbols of the first character. The modified time parameter may be applied to the detection and/or decoding of the second message (which was transmitted by the second node immediately following the first message) or the second character of the first message.

The same or further embodiments of the apparatus are able to implicitly modify the time parameter based only on asynchronous transmissions from the second node to the first node and/or without a control line between the first node and the second node.

The time parameter can control or influence the decoding (e.g. directly or indirectly). The time parameter may be a decoded time parameter (decoding parameter).

The time parameter may comprise the clock rate of the first node, the symbol rate of the first node, and/or the ratio of the clock rate to the symbol rate of the first node (also referred to as a divisor). The time parameter may comprise a divisor (e.g., of an integer). The symbol rate may be determined from the divisor based on the clock rate, i.e. based on the clock pulses of the clock pulse generator unit. For example, there is only one clock generator unit in the first node, both for measuring the number of clock pulses and for decoding. Depending on the divisor, the symbol rate may be a fraction of the integer form of the clock rate. The apparatus may, for example, comprise a frequency divider that generates a symbol rate from a clock rate according to a divisor.

For example, a message signal received from the second node may be sampled or undersampled by the first node in accordance with the clock pulses of the clock pulse generator unit. Alternatively or additionally, the received signal may be divided into symbols of the message according to the symbol rate. Alternatively or additionally, the sampling values of the received signal can be divided into symbols of the messages according to a divisor.

The symbol sequence may be shorter than one character in the message. This eliminates the need to use a stop bit during character transmission to maintain consistency as is conventional. In particular, protocol efficiency can be improved because the stop bit is not identical to a symbol for transmitting data (control data or valid data (nutzdatan)).

The sampling of the message transmitted from the second node, or the decoding of the symbols of the message, is clock synchronized by the clock pulse generator unit and/or controlled by a time parameter.

The first node may be a node (in particular a slave node) in the communication chain. The first node may be arranged within the communication chain or at the end of the communication chain. A communication chain may include several nodes connected in series for asynchronous data transfer. The communication Chain may be a so-called Daisy Chain (Daisy Chain). The second node may be a master node and/or a node provided upstream of the first node in the communication chain. The third node may be another node, in particular another slave node, and/or a node provided downstream of the first node in the communication chain.

The peripheral unit may comprise a (e.g. serial) first interface for asynchronous transfer of messages from the second node and/or a (e.g. serial) second interface for asynchronous transfer of messages to the third node. The first and second interfaces may both be clock synchronized by a clock pulse generator unit and/or controlled by a modified time parameter.

The peripheral unit may comprise a respective encoder and/or decoder for each interface. A corresponding encoder and/or decoder may be adapted to: and encoding or decoding symbols of characters of the transmitted or received message according to the time parameter.

The time parameter may comprise a clock rate of the clock pulse generator unit. The correction unit may be adapted to: the clock rate of the clock pulse generator unit is modified in accordance with the ratio of the number of measured clock pulses to the number of successive symbols in the symbol sequence. The correction to the corrected clock rate may be a quotient of the predetermined number of clock pulses per symbol and the measured ratio compared to the actual clock rate of the clock pulse generator unit. The predetermined number of clock pulses for each symbol may correspond to a quotient of a modified clock rate (or nominal clock rate) of the clock pulse generator unit and the systematic symbol rate.

Alternatively or additionally, the time parameter may comprise the symbol rate (also: baud rate) of the peripheral unit. The correction unit may be adapted to: the symbol rate of the peripheral unit is modified according to the ratio of the number of measured clock pulses to the number of successive symbols in the symbol sequence. The correction to the corrected symbol rate compared to the predetermined systematic symbol rate may be the quotient of the measured ratio and a predetermined number of clock pulses for each symbol.

The signal of the characters of the message from the second node may be divided into symbols of the message according to the symbol rate. Smaller errors in symbol rate, such as symbol rate deviations smaller than half a symbol per character, may be corrected based on a start symbol and a stop symbol (or stop symbols) for a character. For example, the signal between the start symbol and the stop symbol for the respective character may be divided into symbols of equal length.

Alternatively or additionally, the time parameter may comprise a divisor of a symbol rate of the peripheral unit relative to a clock rate of the clock pulse generator unit. The correction unit may be adapted to: the divisor is modified based on a ratio of the number of measured clock pulses to the number of successive symbols in the sequence of symbols. The modified divisor may be equal to the measured ratio or proportional to the measured ratio.

A sequence of symbols of successive symbols of a message may extend from a first falling (or first rising) pulse edge to a later first rising (or first falling) pulse edge of the message transmission.

The device may be implemented by means of a microcontroller. The correction unit can be implemented by a processor unit, for example a microcontroller.

The microcontroller may comprise the clock pulse generator unit, the peripheral unit and/or the correction unit. The microcontroller may also comprise a Capture-Compare unit (CC unit) to which signals of the messages received from the second node are applied. The CC unit may be adapted to measure the number of clock pulses during transmission of the sequence of symbols.

The symbol sequence of the message may, for example, comprise only symbols for transmitting useful data. The sequence of symbols of the message on which the measurement of the number of clock pulses is based may be followed by a start bit and comprise only symbols for valid data.

The symbol sequence of the message may be shorter than one character of the message. Alternatively or additionally, the symbol sequence of the message may be part of the first character of the message.

The peripheral unit may be further adapted to: the number of clock pulses is measured during the transmission of a predetermined sync character of the message. The correction unit may be further adapted to: the time parameter is corrected based on the ratio of the number of measured clock pulses to the predetermined number of symbols in the synchronization character and/or based on the quotient of the number of measured clock pulses and a predetermined nominal value of the number of clock pulses during transmission of the synchronization character. The sync character may be transmitted at the beginning of the message.

Corrections can always be made based on the synchronization character at the beginning of the message transmission and/or in case the symbols in the message cannot be decoded due to errors or deviations of the time parameter. For example, the time parameter can be corrected at the beginning of the message transmission by means of a synchronization character. During message transmission, the time parameter may be modified based on a ratio of the number of measured clock pulses to the number of consecutive decoded symbols in the symbol sequence.

According to another aspect, an arrangement of nodes connected in series (e.g., in a linear topology) for asynchronous data transfer is provided. The arrangement comprises a first node connected for asynchronous data transmission to a second node, and the first node comprises an embodiment of the apparatus according to the apparatus aspect for modifying a time parameter in the first node in dependence on the second node. Optionally, the layout comprises a second node acting as a master node for the layout. The arrangement further comprises a third node connected to the first node for asynchronous data transfer and comprising a further embodiment of the device according to the device aspect for modifying a time parameter in the third node according to the first node.

According to another aspect of the invention, a method of modifying a time parameter in a first node in accordance with a second node is provided. The method comprises or causes a step of providing periodic clock pulses in the first node (e.g. a clock synchronization step). The method further comprises or causes a step of decoding symbols of the message transmitted asynchronously from the second node, and a step of measuring the number of clock pulses during transmission of a sequence of symbols of successive symbols of the message. The method further comprises or causes the step of modifying the time parameter in dependence on a ratio of the number of measured clock pulses to the number of successive symbols in the sequence of symbols.

The method may further comprise any steps and any features disclosed in the context of the apparatus aspects and vice versa.

Drawings

The aforementioned preferred embodiments, features and method steps of the invention can be combined with one another as desired. Further details and advantages of the invention are described below with reference to the drawings. Wherein:

FIG. 1 is a schematic diagram of one embodiment of an apparatus for modifying a time parameter in a first node based on a second node;

FIG. 2 is a flow diagram of one embodiment of a method of modifying a time parameter in a first node according to a second node, which may be implemented by the apparatus shown in FIG. 1;

FIG. 3 is a schematic diagram of an exemplary layout of a plurality of nodes in series, which nodes can at least partially embody the apparatus shown in FIG. 1; and

fig. 4 is a diagram of an exemplary message that may be transmitted from or to one of the nodes.

Detailed Description

Fig. 1 is a schematic block diagram of one embodiment of an apparatus, indicated generally by the reference numeral 100, for modifying a time parameter in a first node in accordance with a second node.

The apparatus 100 comprises a clock pulse generator unit 110 which provides periodic clock pulses in a first node. The device 100 further comprises a peripheral unit 120 which decodes the symbols of the message asynchronously transmitted from the second node and measures the number of clock pulses during the transmission of a sequence of symbols of successive symbols of the message by means of a counter 124. The apparatus 100 further comprises a correction unit 130 for correcting the time parameter in dependence on a ratio of the number of measured clock pulses to the number of consecutive symbols in the sequence of symbols 406.

The time parameter may comprise the clock rate 115 of the supplied clock pulses or a control parameter of the clock pulse generator unit for controlling the clock rate. Alternatively or additionally, the time parameter may comprise the symbol rate 125 of the peripheral unit 120, or a control parameter of the peripheral unit for controlling the symbol rate 125. At least the latter example of the time parameter may be written to a register of peripheral unit 120 as shown in fig. 1.

The control parameter for controlling the symbol rate may be a divisor of the clock rate. For example, the symbol rate may be the clock rate 115 divided by the divisor.

The symbol rate 125 may be a function of a time parameter. The symbol rate may be, for example, the quotient of the clock rate 115 and the divisor, where the clock rate 115 and the divisor are examples of time parameters.

The sequence of symbols may be determined by successive symbols. For example, the symbol sequence may extend from a first falling (or rising) pulse edge to a first rising (or falling) pulse edge in the message signal received via peripheral unit 120.

The number of clock pulses during the symbol sequence may be written to the counter 124. The counter 124 may be set to zero, for example, at the beginning of a message and/or at the beginning of a symbol sequence. Each clock pulse of the clock pulse generator 110 increments the counter 124 by one. The correction unit 130 is able to read the number of clock pulses measured at the end of the symbol sequence from the counter 124, e.g. as the denominator of the ratio of the number of clock pulses to the number of symbols in the symbol sequence.

The peripheral unit 120 also comprises a decoder 122 which implements the decoding of the message received from the second node. The decoder 122 can output the number of successive symbols belonging to the symbol sequence to the correction unit 130. Alternatively or additionally, the correction unit can determine the start and/or end of a symbol sequence and/or the number of symbols in a symbol sequence from the symbols output by the decoder 122.

Optionally, the apparatus 100 or the first node is adapted for bidirectional communication with a second node. To this end, the apparatus 100 or first node comprises a first interface 121 comprising a decoder 122 and further comprising an encoder 123. The encoder 123 is adapted to generate symbols for a message sent to the second node via the first interface 121.

Furthermore, the apparatus 100 or the first node can also perform an asynchronous data exchange with a third node via the second interface 126. To this end, the apparatus 100 or the first node may comprise a second interface 126. The second interface 126 may comprise a decoder 127 and an encoder 128 for receiving or sending messages from or to the third node.

The second node may be a master node or a (e.g. higher ranked compared to the first node) slave node giving the first node a systematic symbol rate based on asynchronous data transmission only. The first node may be a slave node with respect to the second node. The third node may be a (e.g. lower ranked compared to the first node) slave node.

The same symbol rate 125 may be applied to both interfaces 121 and 126. For example, the correction unit 130 can correct the time parameter according to the ratio measured on the first interface 121. Thereby, the symbol rate 125 can be maintained even on the second interface 126, for example. A given symbol rate can be further communicated on the first interface (for example on the input side, i.e. in the receiving path of the asynchronously transmitted messages) in particular on the second interface (for example on the output side, i.e. in the sending path of the asynchronously transmitted messages). In this way, the master node can be given a uniform system symbol rate over several slave nodes connected in series for asynchronous data transmission.

Each of the two interfaces 121 and 126 of the first node may be a so-called "Universal Asynchronous Receiver Transmitter" interface (UART interface).

Figure 2 is a flow diagram of one embodiment of a method, indicated generally by the reference numeral 200, for modifying a time parameter in a first node in accordance with a second node.

In step 210, a periodic clock pulse is provided in the first node. In step 220, the symbols of the asynchronously transmitted message from the second node are decoded. In addition, the number of clock pulses during the transmission of the symbol sequence of successive symbols of the message is measured in step 220. In step 230, the time parameter is corrected based on the ratio of the number of measured clock pulses to the number of consecutive symbols in the symbol sequence (shortly: the measured ratio).

In each aspect of the invention, the number of consecutive symbols in the sequence of symbols may be determined based on the decoding. For example, the number of consecutive symbols in a symbol sequence may be determined as the number of decoded symbols corresponding to the symbol sequence time.

The message may include a large number of characters. These characters may also be referred to as bytes. The symbol rate may also be referred to as baud rate. The data to be transmitted may correspond to a sequence of successive characters. The data to be transmitted may comprise valid data and/or control data. Each character may include a certain number of bits, such as 4, 7, 8, 10, or 12 bits. Each character may be encoded (i.e., output as a transmitted signal on a transmit line) or decoded (i.e., detected from a received signal on a receive line) according to an encoding method. Each symbol may correspond to one or several bits, e.g. depending on the encoding method.

For simplicity, without loss of generality, it is assumed hereinafter that each bit corresponds to a symbol.

In conventional asynchronous data transmission, baud rate errors can occur due to temperature drifts of the clock generator unit 110, i.e. of the components generating the clock pulses, which, starting from a certain deviation level, lead to a communication termination. To prevent this, the conventional solution is to use expensive quartz to generate the clock pulses. According to the embodiment of the present invention, quartz is not required to be used in the lower-level node (i.e., slave node).

A measurement 220 of the ratio of clock pulses to each decoded symbol and/or a correction 230 based on the measured ratio may be performed by the apparatus 100 in the first node (e.g., in one of the slave nodes) for all X received messages, where X is a predetermined integer.

The correction unit is capable of measuring the symbol sequence as part of the first byte of the received message. From the number of bits and the number of measured clock pulses, the measured ratio, i.e. the number of clock pulses per bit (shortly: clock pulse/bit), can be determined. The measured ratio may also be referred to as the actual clock pulse per bit (abbreviated as actual clock pulse/bit).

In one embodiment, the number of nominal clock pulses per bit (shortly: nominal clock pulses/bit) is predetermined. The correction unit 130 calculates the difference between the nominal clock pulse and the actual clock pulse for each bit, i.e.

Offset is nominal clock pulse/bit-actual clock pulse/bit.

This is the deviation in clock pulses per bit.

In order to correct the baud rate 125 in the first node (i.e. in the slave node), the correction unit 130 starts with the current baud rate. The values of these baud rates may be equal to the system baud rate, but may be correspondingly different from the system baud rate due to the skew in the clock rate 115. Therefore, before correction, the value in the register "Slave-Baudrate" is the value of the system Baudrate. After correcting this register value as an example of a time parameter, the value in the register "Slave-Baudrate" is corrected

Corrected baud rate is the system baud rate [1 ± correction factor (offset) ], the system baud rate ± correction rate (offset)

The correction factor or rate is a function of the deviation. For example,

the correction factor (offset) is offset/[ nominal clock pulse/bit ],

by modifying the baud rates of the two interfaces 121 and 126 of a slave node (taking the first node as an example), in a linear topology, the next slave node (e.g., the first node, which is the next level node after the second node) can adjust its baud rate according to the baud rate of the previous master or slave node (e.g., the second node).

By modifying the baud rate 125 as an example of a time parameter, an internal adjustment can be achieved, whereby the baud rate of the respective node, which can be observed from the outside (for example at the second interface 126), remains at a defined system baud rate (preferably only given by an asynchronous data transmission from the master node) as the temperature of the node increases.

Fig. 3 is a schematic diagram of a topology 300 (also: system) of nodes that are connected in series (i.e., using a linear topology) for asynchronous data transmission. The first node of the layout may be given a system baud rate for the entire layout 300 as master node 310 in that each slave node 320 located downstream from master node 310 has one embodiment of apparatus 100.

Master node 310 (preferably as the sole node of layout 300) comprises, for example, an oscillating quartz 312. By means of the quartz oscillator 312, the master node generates a symbol sequence during the transmission of the message, the symbol rate of which is given the system symbol rate.

In particular, the first interface 121 is connected to a neighboring node (so-called second node) that is topologically closer to the master node 310 than to the corresponding node (so-called first node). First interface 126 is connected to a neighboring node (so-called third node) that is topologically further away from master node 310 than the corresponding node (so-called first node).

This arrangement 300 may also be referred to as a daisy chain. Messages that traverse topology 300 (e.g., from master node 310) from slave node 320 to slave node 320 may also be referred to as daisy-chained messages.

The lower cost internal oscillator has a high temperature dependence, and embodiments of the device prevent baud rate drift in the event of a temperature rise in the slave node 320, thus eliminating the need for the use of more expensive oscillator quartz in the slave node.

The device 100 implements a preferred embodiment by means of a microcontroller (abbreviated as "muc" in fig. 3). A so-called "capture-compare unit" (CC unit) in the microcontroller can implement a counter 124 for measuring the clock pulse/bit ratio, for determining the nominal baud rate of the system from the daisy chain message, and for balancing the temperature drift of the internal oscillator. To this end, the signal input 322 of the CC unit is supplied with the signal of the message from the second node, for example, in such a way that the receiving line (denoted "Rx" in fig. 3) of the first interface 121 is connected to the signal input 322.

Fig. 4 is a schematic diagram of the beginning of a signal of a message 400. In the schematic illustration of fig. 4, time increases from left to right. The voltage levels of the signals are schematically shown in the vertical direction.

This message includes several characters (i.e., bytes) 402 and 404. The symbol sequence 406 measured by the peripheral unit 120 (e.g., CC unit) is part of the first character 402. That is, the measured symbol sequence 406 ends with or before the last symbol (preferably the last data symbol) of the first character 402.

For example, the beginning of the measured symbol sequence 406 is defined by a first falling edge 408 in the first character 402 of the message 400, and the end of the measured symbol sequence 406 is defined by a first rising edge 410 following the first falling edge 408. The first falling edge 408 may correspond to a start bit. Alternatively or additionally, a first rising edge 410 following the falling edge 408 may precede a stop 412 (or stops) of the first character 402. Each character 402 and 404 may be enclosed by a start bit and a stop bit.

According to one embodiment of the method 200, the number of clock pulses in the symbol sequence 406 may be measured according to step 220 for all X messages 400 received (i.e., according to the X messages 400 received), for example, by activating a CC unit in the slave node 320. The CC cell in node 320 measures the clock pulses of the first byte 402 received from the falling edge 408 until the rising edge 410.

The peripheral unit 120 of the slave node 320 decodes the symbols (i.e., bits) of the first byte 402 according to step 220. In other words, the slave node 320 evaluates the first byte 402 arriving on its receive line and determines the number of symbols (i.e., bits) included in the symbol sequence 406 (i.e., the CC measurement in step 220). From the number of bits and the measured number of clock pulses (also: CC clock pulses), the CC clock pulse ratio (also: CC clock pulses/bit) can be calculated for each bit. This ratio is the measured ratio or the actual ratio (shortly: actual clock pulse/bit).

In a first variant of the embodiment, the symbol rate 125 of the slave node 320 is controlled by the divisor relative to the clock rate 115. The divisor is one example of a time parameter. In a first variant, the measured ratio can be set to a modified divisor, for example by writing the measured ratio to a corresponding register for controlling the symbol rate 125.

In a second variant of the embodiment, in the correction unit 130 of the slave node 320, the nominal clock pulse per bit (shortly: nominal clock pulse/bit), i.e. the nominal value of the ratio, is given as a constant. The nominal value of the ratio can be calculated from the quotient of the nominal Clock rate (e.g., CC Clock) and the system baud rate. Examples of numbers are for example:

CC _ Clock/baud rate 48000000 Clock/312.5 kBd 153.6 Clock/bit.

The deviation of the ratio measured in step 220 from the nominal value of the given ratio is called Takt _ pro _ Bit _ diffrenz (difference of clock pulses per Bit):

takt _ pro _ Bit _ diffrenz is nominal clock pulse/Bit-actual clock pulse/Bit,

that is, the skew is expressed in clock pulses per bit.

The modification unit 130 modifies the digital baud rate 125 in the slave node 320 as an example of a time parameter in step 230. Before correction, the digital Baud rate 125, e.g., the value "Slave Baud" in the corresponding registers of the interfaces 121 and 126, is equal to the system Baud rate. The corrected digital baud rate is

Slave _ Baud ═ system Baud rate ± correction factor (Takt _ pro _ Bit _ diffrenz)

By performing baud rate correction for both slave UARTs 121 and 126, the next slave node (i.e., the third node) can adjust the baud rate according to the baud rate of the previous slave node (i.e., the first node).

With this internal adjustment, the baud rate of the slave node remains at the defined system baud rate as the temperature of the slave node increases, which can be observed externally.

As disclosed in connection with the above embodiments and variations thereof, the apparatus 100 may be implemented in any system, and in particular in any arrangement 300, having a defined system symbol rate (i.e., nominal baud rate). A numerical example of a systematic symbol rate is 312.5kBd ═ 312500Bd, where Bd represents the unit "baud", i.e., symbols per second (e.g., bits per second).

Preferably, in step 220, the number of clock pulses within the system sequence 406 can be measured in each slave node by means of a capture-compare unit, which measures, for example, the number of clock pulses between the switching of the pulse edges of the signal of the received message.

Alternatively or additionally to each embodiment and each variation, at least one of the following aspects may be implemented. The first embodiment does not employ an oscillating quartz 312 in the master node 310. This technique can be employed, for example, for a master node that can access an upper level system as a slave. To this end, master node 310 is optionally equipped with an embodiment of apparatus 100 that adjusts the symbol rate of the master node according to the superior system, where the superior system does not, for example, need to support a master-slave mechanism.

The described implementation of the method 200 is directed to evaluating the content of the received byte 402 (i.e. decoding the byte 402) against a measurement of the number of clock pulses in the symbol sequence 406 by means of the counter 124, e.g. by means of the capture-compare unit. A prerequisite for this is that this byte 402 is still decodable (i.e. receivable), i.e. the deviation in symbol rate (or existing error) that occurs until that moment is still below the threshold for decoding error (i.e. threshold for non-receptivity). Alternatively or additionally, the second embodiment avoids this limitation (e.g., the limitation on the volatility of the clock rate 115) by transmitting a sync character 402 (e.g., a sync byte specified in the communication protocol) at the beginning of the message 400, so that the measured ratio need not be determined based on the decoded symbols of the received valid data, and the measured ratio is therefore independent of the success or failure of the reception of the symbol sequence 406 (i.e., decoding success or failure). Thus, the volatility of clock rate 115 (e.g., a sudden deviation in clock rate 115) or the drift range of clock rate 115 may be further increased while still ensuring that coherency is maintained for asynchronous data transfers. For this reason, a scheme of adding a sync character to the message length is acceptable.

The number of clock pulses during the transmission of the predetermined sync character of the message 400 may be measured by means of the CC unit 124. The measured ratio, which is the basis for the correction time parameter, is derived from the ratio of the number of measured clock pulses 124 to the predetermined number of symbols in the synchronization character, wherein the symbols of the synchronization character do not need to be decoded or decodable. In a variant of the second embodiment, during the transmission of the synchronization characters, the quotient of the measured number of clock pulses 124 and a predetermined nominal value for the number of clock pulses is determined. The digital symbol rate 125 or corresponding divisor may be modified by this quotient. Alternatively, the clock rate 115 may be modified by the inverse of this quotient.

As an alternative or in addition to the modification of the digital baud rate 125 or of the corresponding divisor (as an example of a time parameter), the third embodiment can modify (i.e. calibrate) the internal clock pulse generation by means of the clock pulse generator unit 110. In other words, the clock rate 115 may be modified (as another example of a time parameter).

The measurement 220 of the number of clock pulses in the symbol sequence 406 can be triggered and ended by falling and rising edges. For example, a pulse edge change can trigger a hardware interrupt, which initiates or terminates the corresponding measurement procedure. For example, the clock (e.g., CC timer) of the peripheral unit 120 (e.g., CC unit) is started or stopped by the signal application 322, wherein the clock is the counter 124, which is incremented by one by each clock pulse of the clock pulse generator unit 110. The fourth embodiment measures 220 the number of clock pulses in the symbol sequence 406 by Polling or sampling the signal received on the first interface 121, for example by round robin Polling, for example by so called Polling. The counter 124 may be started or stopped when a corresponding pulse edge change is detected in the round robin query.

While the invention has been described with reference to exemplary embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted. Many variations are possible to adapt to particular situations, particular topologies of asynchronous data transfers, and/or particular communication protocols in accordance with the principles of the present invention. Therefore, it is intended that the invention not be limited to the disclosed embodiments, but that the invention will include all embodiments falling within the scope of the appended claims.

Description of the reference numerals

100 device for correcting time parameters

110 clock pulse generator unit

115 clock generator unit, in particular clock rate or control parameter of clock rate

120 peripheral unit

121 first serial interface

122 decoder of a first interface

123 encoder of first interface

124 counter, in particular capture-compare unit

125 peripheral unit, in particular a register for the symbol rate or a control parameter for the symbol rate

126 second serial interface

127 decoder of second interface

Encoder of 128 second interface

130 correction unit

200 method for correcting time parameter

210 clock synchronization step

220 decoding and measuring step

230 correction step

300 series node layout

310 master node

312 oscillator, in particular a quartz crystal oscillator comprising an oscillating quartz

320 slave node

322 to the signal of the capture-compare unit

400 message

402 first character of message

404 second character of the message

406 symbol sequence

408 first falling edge of message, e.g. start bit of first character of message

410 first rising edge of message

Stop bit of first character of 412 message

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于通过HTTP的动态自适应流的方法和装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!