This invention relates to network receivers for a network that uses distributed clock synchronization. The invention further relates to a method of sampling a signal received from the network with distributed clock synchronization. The network receiver and the method may be used in a Controller Area Network (CAN).
Various communication networks and communication protocols do not have a central clock but use distributed clock synchronization. In distributed clock synchronization type of networks, devices are able to communicate with each other over, for example, a bus without sharing a (central) clock signal. In such networks and protocols each device has an internal clock which needs to have a certain accuracy such that the devices can communicate with each other via the bus. If the internal clocks operate, within certain tolerances, at the same frequency or, in other examples, at frequencies that relate to each other, a receiver is able to synchronize with the transmitter and decode the received data packet without errors.
The required tolerances may be met by crystal or ceramic oscillators. However, in specific applications it is required that an oscillator is implemented on an integrated circuit without external components is used and, thus, it is required to use of a fully integrated RC or LC oscillator. It is relatively difficult to implement an integrated oscillator which provides the required accuracy especially when a very wide range of operating temperatures and a life-time of the devices is taken into account. Furthermore, in the specific applications, the network devices with the internal oscillators may be required to use limited power and to be manufactured cost efficiently. Therefore, there is an incentive to use low precision clock source in devices of a network that uses distributed clock synchronization. However, if the clock sources do not operate within the tolerance limits defined in the network and communication protocol specifications, they cannot be used to reliably synchronize to the received data.
An example of a network/communication bus with distributed clock synchronization is the Controller Area Network (CAN, ISO 11898) which is a message based network that is often used in vehicles and is also used in industrial automation and medical equipment. The CAN standard is designed to allow digital devices to communicate with each other via a bus without the presence of a host computer. The CAN physical layer specification defines also CAN high-speed medium access units with selective wake-up (SWU) functionality. Such devices wake-up or wake-up another circuitry in response to receiving particular messages via the CAN bus. Most CAN SWU devices are low-power devices and need to be manufactured relatively cost-effective—thus, the CAN SWU devices preferably have a cost clock source, and, as previously discussed, low cost clock sources are often a low precision clock source.
US2012/0185721 describes a possible solution for reliable receiving information with CAN SWU devices that have a low precision clock source. The cited patent application proposes to use multiple timing engines that sample received bits with slightly different frequencies and a timing engine resolver which determines which one of the multiple timing engines correctly samples the received bits. A disadvantage of the proposed solution of the cited patent application is that a plurality of timing/sampling engines for sampling the received signal must be implemented. This implementation incurs silicon area and test penalties to the die costs of an integrated circuit on which the CAN SWU devices are implemented.
The present invention provides a network receiver, a CAN network device, a CAN network, a vehicle, an integrated circuit and a method of sampling at a network receiver a signal received from a network using distributed clock synchronization as described in the accompanying claims.
Specific embodiments of the invention are set forth in the dependent claims.
These and other aspects of the invention will be apparent from and elucidated with reference to the embodiments described hereinafter.
Further details, aspects and embodiments of the invention will be described, by way of example only, with reference to the drawings. Elements in the figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale.
Elements in the figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale. In the Figures, elements which correspond to elements already described may have the same reference numerals.
As discussed above, the Controller Area Network (CAN) network (ISO 11898) uses distributed clock synchronization. This means that there is no central clock or central clock signal, but that each device has its own internal clock and synchronizes to the transmitter via the received signals. In the following of this document, the invention is described in context of a CAN network, however, the invention also applies to other networks that use distributed clock synchronization.
In, for example, US 2012/0185721A1 a description of the bit sampling and synchronization mechanism defined for CAN networks can be found. The discussion of
In CAN devices, the internal clock base is extracted from the incoming data. As synchronization occurs on negative edges of the bits and if a long string of the same value bit, for example 1's, are received, there is no negative edge to allow synchronization. In order to limit the number of bits received before synchronization occurs, the CAN protocol uses bit stuffing. The CAN bit stuffing rule allows at most 5 consecutive bits with the same polarity, thus assuring that there are enough polarity changes in the data to synchronize sufficiently. For example, when 5 bits identical bits in a row are received, a stuffing bit of the opposite value may be put into the bit stream in order to force a transition. Under this rule, synchronization will occur within at least every 10 bits. Thus, the bit stream showed in
In CAN, a Nominal Bit Time (NBT) may be defined as presented in
As the time base is only synchronized on negative edges, in the worst case scenario, it may take 10 bits before the internal time base is re-synchronized, as is shown in
In the following of this document the Controller Area Network (CAN) network (ISO 11898) is used as an example of network to which the network receiver according to the invention may be coupled. It is to be noted that the network receiver may also be used in combination with other networks which use distributed clock synchronization.
The network receiver 300, NR comprises a data sampler 308, DS, a clock bit comparator 312, CBC and a sampling moment adaptor 322, SMA. The signal 304 received from the network NW, 390 is provided to the data sampler 308, DS and the clock bit comparator 312, CBC. The received signal 304 might be an analogue signal and comprises a series of data symbols which represent information. The data symbols are, for example, bits. In the following we assume that the received signal 304 comprises a train, or a sequence, of bits.
The data sampler 308, DS samples the received signal 304 at sampling moments. The results of the sampling form a digital output signal 310 which is constituted by a train of data symbols, for example, a sequence of bits. In the following it is assumed that the digital output signal 310 is formed by a train of bits. The sampling moments are selected moments of time which is somewhere in between the start of a received bit and the end of the received bit. The actual value of the received signal 304 at that specific moment of time is transformed into a digital value. During every period of time that represents a received bit, the input signal 304 is sampled to obtain the sequence of bits of the digital output signal 310.
In a specific embodiment, such as in the example of a CAN network, the period of time that constitutes a single bit is subdivided in several segments, see for example,
An internal clock 306, CLK of the network receiver 300, NR must fulfill certain accuracy requirements. In a traditional CAN network the accuracy of the internal clock 306, CLK must be within 1.5% of the value specified by the CAN specification in order to guarantee that the receiver synchronization mechanisms defined in the CAN specifications result in a correct synchronization of the network receiver 300, NR with the received signal 304. If the internal clock 306, CLK has a frequency which is outside this accuracy limit, the network receiver 300, NR may sample the received signal 304 at incorrect moments of time which results in an incorrect digital output signal 310 and/or in the generation of an synchronizing error which indicates that the network receiver 300, NR is not capable of synchronization with the received signal 304. The network receiver 300, NR of the current invention provides means which allow the internal clock 306, CLK to operate with a limit of ±4% from the defined values of the specification. In particular, the network receiver 300, NR comprises the clock bit comparator 312, CBC and the sampling moment adaptor 322, SMA to correct the sampling moment for larger deviations of the internal clock 306, CLK from the specified clock frequencies. This allows the use of an oscillator that has been implemented on an integrated circuit and that does not have external components (such as a crystal). In particular in CAN network receivers which comprise a selective wake-up (CAN SWU) core, it is advantageous to be able to use such an fully integrated oscillator because standards define the pins of a package of integrated circuit that comprises such a CAN SWU and no additional pins are available for connecting the circuitry to, for example, a crystal. It is also advantageous to have the fully integrated oscillator because it reduces the price of the device. The function of the CAN SWU core is a circuitry which decodes received CAN (data) frames and compares it against wake-up criteria which have been described, for example, in the ISO 11898-6 document. If the wake-up criteria are fulfilled the CAN SWU core will initiate a wakeup of the full network node/network device and if the criteria are not fulfilled, no further actions are taken.
The clock bit comparator 312, CBC is configured to compare a length of a first time period of at least five consecutive bits of the received signal 304 with a length of an internal clock time interval that should represent the same number of bits of the first time period. It is to be noted that the term should is used, because, in the ideal case, the internal clock 306, CLK is 100% accurate and has exactly the correct frequency for synchronizing with the received signal. However, in reality the transmitter that transmitted the received signal 304 might have an internal clock that is not 100% accurate, the network receiver 300, NR has an internal clock that is not 100% accurate, and the network 390, NW might also introduce possible inaccuracies. According to the invention, the length of the internal clock time interval is defined by the (inaccurate) operation of the internal clock 306, CLK and has a length that, assuming the internal clock operates 100% accurate, should be equal to the length of the first time period. Once again, in other words, the first time interval represents a period of time which equals a specific number of received bits of the received signal 304. The internal clock time interval represents a period of time of which the network receiver 300, NR assumes, based on the information that it receives from its internal clock 306, CLK, that the length is equal to the length of the specific number of received bits.
When the length of the internal clock time interval is not exactly equal to the length of the first time period, the difference between the lengths of these periods of time is used by the clock bit comparator 312, CBC to generate a difference signal 320 which indicates the value of the difference. It is to be noted that it is not necessary that the difference signal 320 exactly indicates the amount of the difference in, for example, seconds—other units or indicators may be used as well.
In another embodiment, the clock bit comparator 312, CBC may compare the first time period which has the length of at least 10 consecutive bits of the received signal with the internal clock time interval that should represent the same number of bits. In a further embodiment, the clock bit comparator 312, CBC may compare the first time period which has the length of at least 20 consecutive bits of the received signal with the internal clock time interval that should represent the same number of bits.
The clock bit comparator 312, CBC optionally comprises an edge distance measurer 314, EDM and an error accumulator 318, EA. The edge distance measurer determines a difference between a length of a second time period and a length of a third time period, wherein the second time period is a period of time in between two consecutive falling or raising edges of the received signal 304 and the third time period represents an internal clock time period that should represent the same number of bits as the number of bits of the second time period. The edge distance measurer 314, EDM generates an error signal 316 which indicates, or in other words, represents, the difference between the lengths of the second time period and the third time period. The second time period is in between consecutive falling edges or in between consecutive raising edges and, consequently, the shortest possible length of the second time period is that of two consecutive bits (e.g.0-1 or 1-0). As discussed in the context of
The error accumulator 318, EA receives the error signal 316 and accumulates differences indicated by the error signals until at least the length of the first time period of at least five consecutive bits of the received signal is compared to the lengths of internal clock time interval that should represent the same number of bits as the number of bits of the first time period. As discussed above, the second time period may be shorter than the at least five consecutive bits. Thus, the measurement of a difference between the second period and the third period must be performed at least once more to have a first time period which has at least the length of five consecutive bits. The error accumulator 318, EA accumulates, which means “adds”, the errors/differences of consecutive edge distance measurements. The error accumulator 318, EA generates the difference signal 320.
The sampling moment adaptor 322, SMA receives the difference signal 320 and adapts the relative position of the sampling moment within the period of time of a single bit to correct the sampling moment for inaccuracies of an internal clock. As discussed in the context of
If the internal clock 306, CLK is running too fast, the relative position of the sampling moment moves in a forward direction within the period of time that represents a single bit of the received signal, and, consequently, a difference between the length of the first time period of at least five consecutive bits of the received signal with the length of the internal clock time interval that should represent the same number of bits as the number of bits of the first time period becomes larger. If the difference is defined as: the length of the first time period of at least five consecutive bits of the received signal minus the length of the internal clock time interval that should represent the same number of bits as the number of bits of the first time period, the difference becomes a positive number when the internal clock 306, CLK is running too fast. If the difference is a positive number, the sampling moment adaptor 322, SMA adapts the relative position of the sampling moment within the period of time of a single bit to a relative position which is later in time, thus, which is closer to the end of the period of time of a single bit. If the internal clock 306, CLK is running too slow, the relative position of the sample moment moves into a direction of the end of the period of time that represents a single bit of the received signal. If the difference is defined as described above, the difference becomes a negative value. When the difference is a negative value, the sampling moment adaptor 322, SMA adapts the relative position of the sampling moment within the period of time of a single bit to a relative position which is earlier in time, thus, which is closer to the beginning of the period of time of a single bit.
It is to be noted that the error accumulator 318, EA may dynamically chose for which number of consecutive error signals 316 the difference values between the second time period and the third time period are accumulated, such that the accumulated value relates to at least five received consecutive bits. However, in another embodiment, the error accumulator 318, EA always accumulates the differences indicated by a fixed amount of consecutive error signals. In yet a further embodiment, the error accumulator 318, EA accumulates the differences indicated by at least two consecutive error signals 318. In an embodiment, this is for at least 3 consecutive error signals. In an embodiment, this is done for at least 4 consecutive error signals. As discussed previously, the second time period has the length of 2 to 10 bits. Thus, when the differences of exactly two consecutive error signals are accumulated, the accumulated differences relate to 4 to 20 bits.
The sampling moment adaptor 322, SMA optionally comprises a threshold slicer 324, TS. The threshold slicer 324, TS receives the difference signal 320 and compares the error/difference value indicated by the difference signal 320 with a first threshold value and with a second threshold value and generates a first adaptation signal 328 and a second adaptation signal 326 in accordance with the results of the comparisons. The first threshold value is a negative value and the second threshold value is a positive value. In specific embodiments, the first threshold value and the second threshold value are predetermined values, however, in other embodiments, the first threshold value and the second threshold value may be dynamically adapted by circuitry present in the device which comprises the network receiver 300, NR to, for example, adapt the threshold values to changed operational conditions. If the value indicated by the difference signal 320 is smaller than the first threshold value, the first adaptation signal 328 is generated. If the value indicated by the difference signal 320 is larger than the second threshold value, the second adaptation signal 326 is generated. The threshold slicer 324, TS may be used to prevent that for, e.g., too small errors a correction is made. Or the threshold values may be selected such that, when a difference is detected that is well-correctable by the standard CAN synchronization mechanisms, the network receiver 300, NR according to this invention does not adapt the sampling moment. If, the sampling moment adaptor 322, SMA comprises the threshold slicer 324, TS, the first and second adaptation signal 328, 326 are used to correct the relative position of the sampling moment within the time period of a single bit in a forward or reverse direction (or vice versa). It is to be noted that the threshold slicer 324, TS may comprise more than two threshold values and compares the error/difference value of the difference signal 320 with three or more threshold values. For example, the threshold slicer 324, TS compare the error/difference value with a first to fourth range and generates four adaptation signals wherein each adaptation signal relates to one of the ranges. In this way the sampling moment adaptor 322, SMA may be capable of adapting the relative position of the sampling moment within the period of time of a single bit with more precision because the more than two adaptation signals provide more information about the magnitude of the error/difference value.
For example, the threshold slicer 324 TS has a first threshold value and a second threshold value which prevents that the sample moment adaptor 322, SMA corrects the relative position of the sampling moment when the accuracy of the internal clock 306, CLK is within 1.5% of the frequency of the received signal 304 because known mechanisms in the CAN bus specification are able to correct for such inaccuracies. For example, when one bit is represented by 16 time quanta tq, and when the clock bit comparator 312, CBC compares a length of the first time period of five consecutive bits with the length of an internal clock time interval which has also the length of five bits, the five bits are represented by 80 time quanta tq, which results in a first threshold value of −2 and a second threshold value of 2.
The sampling moment adaptor 322, SMA may optionally comprise a segment adaptor 330, SA. In particular when the sampling moment is a moment of time in between a first bit segment and a second bit segment, the segment adaptor 330, SA adapts the length of the first bit segment and the length of the second bit segment such that the relative position of the sampling moment changes. The segment adaptor 330, SA receives the first and second adaptation signal 328, 326 and uses the information provided by these signals 328, 326 to change the length of the first bit segment and of the second bit segment. When the network 390, NW is a CAN bus, the total length of the first bit segment and the second bit segment should remain constant, and, thus, when the first bit segment is made longer, the second bit segment is made shorter with the same amount.
The sampling moment adaptor 322, SMA is coupled to the data sampler 308, DS to provide to the data sampler 308, DS information about the adapted sampling moment. For example, when the sampling moment adaptor 322, SMA comprises the segment adaptor 330, SA, the new settings for the length of the first bit segment and the length of the second bit segment are communicated to the data sampler 308, DS.
The different concepts of the above discussion are further discussed and explained together with
The network receiver 300, NR of
It is to be noted that the network receiver 300, NR of
At moments of time 404 the received signal 404 has falling edges. In the context of CAN busses this means that the signal transmitted by the CAN bus changes from a recessive state to a dominant state. In the discussion of
In
It is to be noted that the method 500 of the invention provides the same benefits as the network receiver according to the invention and has similar embodiments with similar effects as the corresponding embodiments of the network receiver.
In an embodiment, a computer program is provided which comprises instructions for causing a processor system to perform the method 500 of the invention. In a further embodiment, the computer program is embodied on a computer readable medium. Thus, the invention may also be implemented in a computer program for running on a computer system, at least including code portions for performing steps of a method according to the invention when run on a programmable apparatus, such as a computer system or enabling a programmable apparatus to perform functions of a device or system according to the invention. The computer program may for instance include one or more of: a subroutine, a function, a procedure, an object method, an object implementation, an executable application, an applet, a servlet, a source code, an object code, a shared library/dynamic load library and/or other sequence of instructions designed for execution on a computer system. The computer readable media may include, for example and without limitation, any number of the following: magnetic storage media including disk and tape storage media; optical storage media such as compact disk media (e.g., CD-ROM, CD-R, etc.) and digital video disk storage media; nonvolatile memory storage media including semiconductor-based memory units such as FLASH memory, EEPROM, EPROM, ROM; ferromagnetic digital memories; MRAM; volatile storage media including registers, buffers or caches, main memory, RAM, etc.; and data transmission media including computer networks, point-to-point telecommunication equipment, and carrier wave transmission media, just to name a few.
In summary, the application provides a network receiver for a network using distributed clock synchronization and a method of sampling at a network receiver a signal are provided. The network receiver receives from the network an input signal which is sampled by a data sampler of the network receiver at sampling moments. Sampling moments have a relative position in time within a period of time of a single bit. The network receiver further comprises a clock bit comparator and a sampling moment adaptor. The clock bit comparator compares lengths of a first time period lapsed while receiving at least five consecutive bits of the signal and of an internal clock time interval representing the same number of bits as a number of bits of the first time period. The sampling moment adaptor adapts the relative position of the sampling moment in dependence of a result of the comparison of the lengths to reduce a difference between the lengths.
In the foregoing specification, the invention has been described with reference to specific examples of embodiments of the invention. It will, however, be evident that various modifications and changes may be made therein without departing from the broader spirit and scope of the invention as set forth in the appended claims. For example, the connections may be any type of connection suitable to transfer signals from or to the respective nodes, units or devices, for example via intermediate devices. Accordingly, unless implied or stated otherwise the connections may for example be direct connections or indirect connections.
As used herein, the term “bus” is used to refer to a plurality of signals or conductors which may be used to transfer one. Logical values discussed in the application are purely exemplary and other logical values may be used according to a specific coding convention. Each signal described herein may be designed as positive or negative logic. In the case of a negative logic signal, the signal is active low where the logically true state corresponds to a logic level zero, or the other way around. In the case of a positive logic signal, the signal is active high where the logically true state corresponds to a logic level one, or the other way around. Note that any of the signals described herein can be designed as either negative or positive logic signals. Therefore, in alternate embodiments, those signals described as positive logic signals may be implemented as negative logic signals, and those signals described as negative logic signals may be implemented as positive logic signals.
The conductors which transfer a signal as discussed herein may be illustrated or described in reference to being a single conductor, a plurality of conductors, unidirectional conductors, or bidirectional conductors. However, different embodiments may vary the implementation of the conductors. For example, separate unidirectional conductors may be used rather than bidirectional conductors and vice versa. Also, plurality of conductors may be replaced with a single conductor that transfers multiple signals serially or in a time multiplexed manner. Likewise, single conductors carrying multiple signals may be separated out into various different conductors carrying subsets of these signals. Therefore, many options exist for transferring signals.
Because the apparatus implementing the present invention is, for the most part, composed of electronic components and circuits known to those skilled in the art, circuit details will not be explained in any greater extent than that considered necessary as illustrated above, for the understanding and appreciation of the underlying concepts of the present invention and in order not to obfuscate or distract from the teachings of the present invention.
The term “program,” as used herein, is defined as a sequence of instructions designed for execution on a computer system. A program, or computer program, may include a subroutine, a function, a procedure, an object method, an object implementation, an executable application, an applet, a servlet, a source code, an object code, a shared library/dynamic load library and/or other sequence of instructions designed for execution on a computer system.
Some of the above embodiments, as applicable, may be implemented using a variety of different information processing systems. For example, although
Thus, it is to be understood that the architectures depicted herein are merely exemplary, and that in fact many other architectures can be implemented which achieve the same functionality. In an abstract, but still definite sense, any arrangement of components to achieve the same functionality is effectively “associated” such that the desired functionality is achieved. Hence, any two components herein combined to achieve a particular functionality can be seen as “associated with” each other such that the desired functionality is achieved, irrespective of architectures or intermedial components. Likewise, any two components so associated can also be viewed as being “operably connected,” or “operably coupled,” to each other to achieve the desired functionality.
Furthermore, those skilled in the art will recognize that boundaries between the functionality of the above described operations merely illustrative. The functionality of multiple operations may be combined into a single operation, and/or the functionality of a single operation may be distributed in additional operations. Moreover, alternative embodiments may include multiple instances of a particular operation, and the order of operations may be altered in various other embodiments.
Also, the invention is not limited to physical devices or units implemented in non-programmable hardware but can also be applied in programmable devices or units able to perform the desired device functions by operating in accordance with suitable program code. Furthermore, the devices may be physically distributed over a number of apparatuses, while functionally operating as a single device.
Also, devices functionally forming separate devices may be integrated in a single physical device. Also, the units and circuits may be suitably combined in one or more semiconductor devices.
However, other modifications, variations and alternatives are also possible. The specifications and drawings are, accordingly, to be regarded in an illustrative rather than in a restrictive sense.
In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word ‘comprising’ does not exclude the presence of other elements or steps then those listed in a claim. Furthermore, Furthermore, the terms “a” or “an,” as used herein, are defined as one or more than one. Also, the use of introductory phrases such as “at least one” and “one or more” in the claims should not be construed to imply that the introduction of another claim element by the indefinite articles “a” or “an” limits any particular claim containing such introduced claim element to inventions containing only one such element, even when the same claim includes the introductory phrases “one or more” or “at least one” and indefinite articles such as “a” or “an.” The same holds true for the use of definite articles. Unless stated otherwise, terms such as “first” and “second” are used to arbitrarily distinguish between the elements such terms describe. Thus, these terms are not necessarily intended to indicate temporal or other prioritization of such elements. The mere fact that certain measures are recited in mutually different claims does not indicate that a combination of these measures cannot be used to advantage.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/IB2013/001453 | 5/29/2013 | WO | 00 |