High-speed communication system

By introducing a variable-length gap data frame structure into master-slave communication, the existing bus system bandwidth limitation and high cost problems are solved, and cheap and efficient high-speed communication is realized, suitable for a variety of network members.

CN113872727BActive Publication Date: 2025-08-26MELEXIS TECH NV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110735482.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-06-30
Filing Date
2021-06-30
Publication Date
2025-08-26
Estimated Expiration
2041-06-30

AI Technical Summary

Technical Problem

Existing network systems have limited bandwidth in communication between electronic components, especially the 20 kBD limit of the LIN bus cannot meet some application needs, while high bandwidth bus systems such as CAN and Ethernet buses are costly and difficult to maintain.

Method used

Using a communication method between the master and the slave device, a slave data frame including a data packet and a variable time length gap is generated. By inserting a gap at the beginning or end of the data packet, the gap time length is calculated using the parameters stored locally by the slave device to avoid data collisions, and high-speed communication is achieved using an inexpensive RC oscillator clock.

Benefits of technology

It realizes cheap and flexible high-speed communication, avoids data collisions caused by oscillator mismatch, reduces system costs, and adapts to different frequency offsets, which are suitable for multiple network members.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113872727B_ABST
    Figure CN113872727B_ABST
Patent Text Reader

Abstract

The present invention relates to a high-speed communication system. A method for communicating between a master device and at least one slave device includes generating a communication frame, wherein generating the communication frame includes generating a slave device data frame. The slave device data frame includes a data packet containing one or more data bytes and at least one gap having a variable time length that does not include information in the slave device data frame. The gap can be at the beginning of the slave device data frame before the beginning of the first data byte of the data packet and / or at the end of the data packet after the end of the last data byte of the data packet, wherein the gap has a time length dependency based on parameters locally stored in each of the at least one slave device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data communications, and more particularly to master-slave communications. Background Art

[0002] Existing network systems generally provide connections between different electronic components and their controllers through a Local Interconnect Network (LIN) or a Controller Area Network (CAN) system, or other systems, and establish a communication protocol between them.

[0003] For example, in automotive applications, several bus systems are already in place. For example, the LIN network connects several slave devices to a master unit. However, the bandwidth is limited to approximately 20 kilobaud, which is unsatisfactory for many applications. Despite this, the LIN bus is seen as a cost-effective solution. Other bus systems (such as the CAN bus, Ethernet bus, or Flexray-based networks) are fast communication interfaces. However, the network implementation is relatively costly. CAN bus is complex, difficult to repair or interchange in the event of a malfunction or accident, and the implementation is expensive. Summary of the Invention

[0004] An object of embodiments of the present invention is to provide a method and system that allows communication between one or more slave devices and a master device, thereby allowing data packets to be transmitted without overlapping in an inexpensive and flexible manner.

[0005] In a first aspect, the present invention provides a method for communicating between a master device and at least one slave device, comprising generating a communication frame, comprising generating a slave device data frame. The slave device data frame comprises a data packet and at least one gap having a variable time length, the data packet comprising one or more data bytes, the gap not including information in the slave device data frame at the beginning of the slave device data frame before the start of the first data byte of the data packet or at the end of the data packet after the end of the last data byte of the data packet. The gap has a time length dependency based on parameters stored locally in each of the at least one slave device. Information is transmitted between a start bit and an end bit, while the gap is outside the data packet. An advantage of an embodiment of the present invention is that high-speed communication is achieved by allowing each slave device to introduce a variable length gap in the communication, thereby avoiding data collisions caused by oscillator mismatches between different network members.

[0006] In some embodiments of the present invention, generating the slave data frame includes generating a first gap and a second gap with variable time lengths at the beginning and the end of the data packet, respectively. An advantage of embodiments of the present invention is that the implementation is flexible for different frequency offsets.

[0007] In some embodiments of the present invention, one of the parameters stored locally in each of the at least one slave device is a slave ID number that uniquely identifies each slave device. An advantage of embodiments of the present invention is that each slave device can use its own ID to provide a unique gap time length and simultaneously obtain the moment when the data frame can start to be transmitted to the master device without communication between the slave devices, thereby allowing the use of simpler protocols than the CAN protocol, such as a (modified) UART protocol.

[0008] In some embodiments of the present invention, the method further includes generating a time base for calculating at least one gap, wherein the timing of the slave device data frame is based on a clock having a nominal target frequency tolerance of less than 5%. An advantage of embodiments of the present invention is that one or more slave devices can use an inexpensive and less accurate RC oscillator clock, achieving low-cost high-speed communication.

[0009] In some embodiments of the present invention, the method further includes generating and sending start of byte (SOB) information having a first data bit, the first data bit further including data direction swap information, which allows distinguishing whether the byte is a data request by the master device or a byte containing data sent by the slave device.

[0010] In some embodiments of the present invention, the parameters are provided in at least one calibration step. Advantages of embodiments of the present invention are that the slave device can be programmed at any time. For example, the duration of the gap can be programmed at any time (e.g., when the sensor is first switched on, during manufacturing, etc.). Some of the parameters (e.g., fixed parameters) can be hard-coded in ROM, such as the nominal data rate, the nominal RCO frequency, etc.

[0011] In some embodiments of the present invention, generating a data frame including at least one gap is performed during an initialization routine of the sensor. An advantage of embodiments of the present invention is that drift (e.g., long-term drift of the slave device or its oscillator, such as aging, etc.) can be at least partially compensated.

[0012] In some embodiments of the present invention, the method further includes obtaining a frequency offset for each slave device, then including a predetermined bus delay for slave devices having a negative frequency offset and excluding a bus delay for slave devices having a positive frequency offset. An advantage of embodiments of the present invention is that additional margin for avoiding collisions can be introduced.

[0013] In a further aspect, the invention provides a software program product adapted to perform the method of the preceding aspect when executed in a processing unit of a slave device connected to a master device. The software program may be implemented in each slave device of the system.

[0014] In a further aspect, the present invention provides a system for communicating between a master device and at least one slave device. The at least one slave device is adapted to generate a slave data frame comprising a data packet comprising one or more data bytes and at least one gap having a variable time length, the gap not including information in the slave data frame at the beginning of the slave data frame before the beginning of the first data byte of the data packet or at the end of the data packet after the end of the last data byte of the data packet. The system is adapted to calculate the gap having a time length dependency based on parameters stored locally in each of the at least one slave device. The system further comprises a master device (12) adapted to receive the slave data frame.

[0015] In some embodiments of the present invention, the master device includes a clock with a tolerance of less than 0.05%, and the slave device includes a clock with a lower accuracy than the master device's clock, to provide a high-speed and cost-effective system. An advantage of embodiments of the present invention is that the system is inexpensive because the slave device can have an inexpensive oscillator while avoiding collisions.

[0016] In some embodiments of the present invention, at least one slave device is a sensor, and the master device is a master control unit.

[0017] In some embodiments of the present invention, a system may be adapted to run a software program according to aspects of the present invention.

[0018] Particular and preferred aspects of the invention are set out in the accompanying independent and dependent claims. Features from the dependent claims may be combined with features of the independent claims and with features of other dependent claims as appropriate, and not merely as explicitly set out in a claim.

[0019] These and other aspects of the invention will be apparent from and elucidated with reference to the embodiment(s) described hereinafter. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 The figure shows the existing UART bit transmission of fast and slow slave devices compared to the UART sampling events of the master device.

[0021] Figure 2is a schematic diagram with method steps according to an embodiment of the present invention.

[0022] Figure 3 The diagram illustrates a communication frame according to an embodiment of the present invention.

[0023] Figure 4A and Figure 4B The figure shows a communication frame for an example of two slave devices with nominal, slow and fast running oscillators considering the worst case.

[0024] Figure 5 and Figure 6 A control system according to an embodiment of the present invention and a master-slave system implemented as a sensor system are respectively illustrated.

[0025] Figure 7 The figure shows a slave device according to an embodiment of the present invention.

[0026] Figure 8A and Figure 8B The figure illustrates an iterative calculation scheme for the gap calculation performed in each slave device.

[0027] The accompanying drawings are only schematic and non-limiting. In the accompanying drawings, the size of some of the elements may be exaggerated and not drawn to scale for illustrative purposes.

[0028] Any reference signs in the claims should not be construed as limiting the scope.

[0029] The same reference numbers in different drawings refer to the same or similar elements. DETAILED DESCRIPTION

[0030] The present invention will be described with respect to particular embodiments and with reference to certain drawings but the invention is not limited thereto but only by the claims. The dimensions and relative dimensions do not correspond to actual reductions to implementations of the invention.

[0031] Furthermore, the terms first, second, etc. in the specification and in the claims are used to distinguish between similar elements and are not necessarily used to describe a sequence in time, space, ranking, or in any other manner. It is understood that the terms so used are interchangeable under appropriate circumstances, and that the embodiments of the invention described herein are capable of operation in different sequences than described or illustrated herein.

[0032] It is to be noted that the term "comprising" used in the claims should not be interpreted as being limited to the means listed thereafter; it does not exclude other elements or steps. Thus, the term should be interpreted as specifying the presence of the stated features, integers, steps or components as mentioned, but does not exclude the presence or addition of one or more other features, integers, steps or components, or groups thereof. Thus, the term "comprising" covers both the case where only the stated features are present as well as the case where these features and one or more other features are present. Thus, the scope of the expression "a device comprising means A and B" should not be interpreted as being limited to a device consisting only of components A and B. This means that for the present invention, the only relevant components of the device are A and B.

[0033] Reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment, but may. Furthermore, in one or more embodiments, the particular features, structures, or characteristics may be combined in any suitable manner, as would be apparent to one of ordinary skill in the art from this disclosure.

[0034] Similarly, it should be appreciated that in the description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. On the contrary, as reflected in the appended claims, inventive aspects reside in fewer features than all of the features of a single preceding disclosed embodiment. Accordingly, the claims appended following the detailed description are hereby expressly incorporated into this detailed description, with each claim itself representing a separate embodiment of the invention.

[0035] Furthermore, although some embodiments described herein include some features included in other embodiments but do not include other features included in other embodiments, as will be understood by those skilled in the art, combinations of features from different embodiments are intended to fall within the scope of the present invention and to form different embodiments. For example, in the appended claims, any of the claimed embodiments can be used in any combination.

[0036] In the description provided herein, numerous specific details are set forth. However, it should be understood that embodiments of the present invention may be practiced without these specific details. In other instances, well-known methods, structures, and techniques are not shown in detail to avoid obscuring understanding of this description.

[0037] Where reference is made to a "master device" in embodiments of the present invention, the reference is to a master unit, which is an electronic unit that generates commands to control one or more electronic units referred to as "slaves" or "slaves". Typically, a master device is a controller and has processing capabilities, for example it can be a control unit, commonly referred to as a master control unit or MCU. In the following description, although "electronic control unit" or ECU will often be mentioned, in general, any control unit (such as a processor) can act as a master device. There is an exchange of information and commands between the slave device and the master device. For example, a slave device can transmit information to a receiving master device.

[0038] Hereinafter, reference will be made to "frequency offset," which is defined as the difference between the actual frequency (Fr) of a slave device and its nominal frequency (Fnom), so the offset is obtained as Fr-Fnom. It should be noted that the slave device should operate at the same frequency as the master device, so the nominal frequency Fnom and the master frequency Fmas are chosen to be identical. Therefore, the offset can also be expressed in terms of the actual slave and master frequencies, as Fr-Fmas. This is why the master device requires a very accurate oscillator, so that the actual frequency of the master device is effectively the same as its nominal frequency. The frequency offset of a slave device can be positive (when the actual frequency is higher than the nominal frequency), causing the slave device to run faster than it should (faster than the master), or negative (when the actual frequency is lower than its nominal frequency), causing the slave device to run slower than it should. The difference between the most positive and most negative frequency offsets defines the tolerance band within which communication must operate.

[0039] The present invention relates to information exchange and communication between nodes. The communication allows slave device data frames to be sent to another unit (usually a master unit) with reduced bus collisions or electromagnetic compatibility (EMC) issues.

[0040] The present invention is applicable to any system that needs to carry out bus communication between electronic components referred to as nodes, wherein one of the nodes can be a control unit (such as ECU) acting as a master device, and at least one further node can be a slave device, such as a sensor (such as a current sensor or a position sensor). However, it can also be applied to systems in which the slave device is a memory or register of any module or subsystem or wherein the slave device is a light node in an actuator or lighting system, etc. In certain embodiments, the present invention is applicable to a system in which a master device initiates a data transmission from one or more slave devices to a master device. For example, the master device can send a control command to an actuator to be placed in a given position, which is interpreted as a trigger by the actuator. After the position is determined, the actuator can pass back status information to the master device according to an embodiment of the present invention. In certain embodiments, the data sent to the master device can be diagnostic information.

[0041] Data transmitted between nodes (especially data transmitted from a device to a master device) needs to be timed, and for this purpose, several signals are exchanged between them. These signals are sent as bits organized in data packets. Data packets are grouped in data frames to form communication frames. Communication frames include data frames sent by the master device and data frames sent by one or more slave devices. Data frames are usually sent by the slave device based on a request from the master device. For example, there is a risk of overlapping frames, collisions, or general communication asynchrony between the master device and the slave device and / or several slave devices that need to send data. In order to reduce the chance of data frame collisions, synchronization bits are sent by the master device. By allowing communication between slave devices, data collisions can be reduced or avoided, but this requires complex communication protocols. Some solutions include careful synchronization between the master device and the slave devices to avoid asynchrony between them.

[0042] The communication may be performed in a Universal Asynchronous Receiver Transmitter (UART) system. Figure 1 An example of existing communication in UART is shown, where a master ECU samples two slave sensors. Because the slave devices have their own electronic components separate from the master device, it is possible for the slave devices to operate at a higher speed than the master device, or at a lower speed. Figure 1 In the specific example of , communication is initiated, for example, with one or more start bits Sr, followed by 8 data bits 0...7, and then one or more stop bits Sp. These bits signal the respective start and stop of transmission and help detect faults in transmission, etc.

[0043] A group (e.g., an octet) of data bits, a start bit or bits, and a stop bit or bits are transmitted over the bus in a byte time (Tbyte). The time it takes for a slave device to transmit each of these bits is the bit time (Tbit), also known as the bit time. This can be defined as the duration of a bit at a single point in the system, excluding additional time (latency, physical layer processing time, transmission time, etc.). Furthermore, the byte time can be defined as the time between the middle of the first start bit and the middle of the last stop bit. It can also be defined as the time between the rising or falling edges of these bits, or any other moment within the bit time, such as 25% or 75% of the bit time. In any case, data transmission begins at the start of each slave device's transmission. Slave devices are electronic components that are distinct from each other and from the master device and need to be synchronized with each other in some way to avoid simultaneous bit transmission, which would cause data collisions and other EMC issues. Figure 1 The sampling of bytes within a predetermined time (Tbyte) is shown, where the sampling events of the ECU UART are fixed. In more detail, the ECU UART sampling events of the bit stream on the bus are provided by the ECU, which is the master device in the communication system, and the sampling events are highly accurate. For example, they can run on a time base derived from a precise clock (such as a dielectric resonator or crystal oscillator clock with a tolerance of, for example, + / - 0.02% of the nominal crystal oscillator frequency).

[0044] Figure 1 The hysteresis problem shown in Figure 1 can be a cause of collisions, especially when several slave devices are sending their data to a single master device in sequence. To address this issue, each slave device can include a precision clock. Thus, Fnom = Fr = Fmas. However, this is not cost-effective. Typically, slave devices connected to the bus operate at a low-precision oscillator frequency, with their nominal oscillator frequency being higher (e.g., several orders of magnitude higher) than the precision clock of the master device.

[0045] This results in a sampling event with a duration slightly different from the transmission time of each bit from the slave sensor (Tbit). In the worst case, there may be a slave device operating at a low frequency of the tolerance band, which means that the MUART of this slave device is running slowly ("slow slave device", showing a negative frequency offset) compared to other slave devices that are operating at their nominal frequency or at a high frequency of the tolerance band and thus have a fast MUART ("fast slave device", with a positive frequency offset). Figure 1The top and bottom of the figure show the cases of a slow slave device (Sensor 1) and a fast slave device (Sensor 2), respectively. Sensor 1 is a slow slave device with a Tbit of 253.5 nanoseconds and a Tbyte of 2535.0ns, and Sensor 2 is a fast slave device running a fast MUART with a Tbit of 240.0ns and a Tbyte of 2400ns. It can be easily seen that the bits of the UART byte are slipping away from the ECU UART. Due to the frequency mismatch of the oscillator, the bit transmission of the slow slave device starts behind the ECU UART sampling event, while the transmission of the fast slave device starts ahead of the ECU UART sampling event. This may cause communication failure at the first UART byte of the UART frame or at one of the subsequent UART bytes because the mismatch is cumulative. When several bytes are sent, EMC issues may arise for at least one slave device. For more than one slave device, there may be data collisions due to clock mismatches causing both to run at different clock speeds.

[0046] Although clock mismatch can be reduced through calibration and synchronization, the problem still exists. For example, an RC oscillator can have a very high tolerance (e.g., + / -15%, or even up to + / -60%), but this variation can be reduced to + / -5% or even lower, such as + / -2.5% or + / -1% (which is still higher than a much more expensive crystal oscillator). The reduced tolerance band of the RC oscillator (e.g., + / -2.5%) ensures that at least one data byte of the sensor is transmitted without failure. The combination of the physical layer and the asynchronous interface has the advantage that each data byte is "resynchronized" with each start bit sample. However, another data packet transmitted by another sensor may cause a data collision on the bus because the sensors are not synchronized with each other and the time budget for the transmission of a given data packet is not met.

[0047] The present invention aims to solve this problem by grouping data bytes in a data packet including at least one data byte and adding a time period in which no information is sent, the time period having a duration established individually by each slave device through parameters stored therein. This time or gap may occur before, after, or both before and after the transmission of a data byte, depending on the frequency offset (whether the slave device is slow or fast). Therefore, it is advantageous to split the data packet into data packets in the form of continuous UART bytes for resynchronization with a higher frequency offset, not at the level of the bit, but at the level of the data packet. The calculation from the time slot is based on the frequency offset of a stable communication (e.g., a single UART) that avoids data collisions.

[0048] The present invention will be explained on the basis of the known UART communication system which is enhanced with specific features to enable high-speed communication between a master device and a slave device.The present invention is not limited to UART.

[0049] The present invention can provide a master device that uses a precise clock, while slave devices can use cost-effective RC oscillators with lower precision than the master's clock. This architecture can be used, for example, in a sensor network where various sensors transmit their sensing information to an electronic control unit (ECU). Because the slave devices use a cost-effective RC oscillator and an enhanced UART as the communication foundation, the entire system achieves high-speed communication at low cost.

[0050] Hereinafter, a slave-master communication method, a system including a slave device suitable for performing the method, and a bus protocol are disclosed, which provides a flexible communication network for robust and fast signal transmission with reduced data collisions.

[0051] In a first aspect, a method for transmitting signals from one or more slave devices to a master device is provided, such as transmitting data from a sensor to a controller, which generates a response based on the received data. Furthermore, the method can be a method for transmitting data from a sensor to an ECU, such as from a position sensor or a current sensor of a brushless DC motor to an ECU that controls the brushless DC motor.

[0052] Figure 2 An example flow chart illustrating the steps of a method according to various embodiments of the present invention is shown. The method includes generating (200) a communication frame including a signal sent by a master device (a request signal, including, for example, a synchronization signal) and a data signal transmitted from a slave device to the master device. The method includes generating (201) a slave device data frame at the request of the master device (for example, upon receiving a request generated (206) by the master device and sent to each slave device (if there is only one slave device, to the slave device)). Generating (201) the data frame includes generating (202) a data packet including generating (203) at least one gap in which no information is sent after sending (205) the data packet, before sending the data packet, or after sending the data packet and before sending the data packet. This is done in each slave device.

[0053] In more detail, each data frame includes one or more sets of bits, called bytes, that form a data packet. A given slave device sends (205) the relevant information in the data packet at a predetermined moment and with a clock signal that may be different from the sampling signal of the master device. The information usually starts with a start bit and ends with an end bit. In order to ensure that there is no data collision with a previous or subsequent transmission, the data frame includes a buffer time, or a gap in which no information is sent. Therefore, the transmission of the data packet begins after a predetermined time after receiving a synchronization signal sent by the master device. The predetermined time includes a synchronization item, or a time gap, that solves the timing mismatch of the data frame transmission between the master device and the slave device in the communication. In an embodiment of the present invention, the gap can occur before the meaningful data packet of the data byte is sent, or after the meaningful data packet of the data byte is sent, or both before and after the meaningful data packet of the data byte is sent. This will depend on whether the slave device is fast or slow, and in some embodiments also depends on the order of data transmission. The gap is obtained from a parameter that each slave device can provide (204).

[0054] This method can be easily applied to any digital asynchronous interface. Typically, these interfaces must cope with frequency mismatches between the transmitter (TX - such as a sensor or slave device) and the receiver (RX - such as an ECU or master device). In an embodiment of the present invention, the method is applied to the UART protocol, and it can include features known in the art. For example, it can be an asynchronous protocol (UART) with start (low bit) and stop (one or two high bits) indications. Advantageously, the receiver (master device) only needs to cope with the TX-RX-frequency offset within a single UART frame.

[0055] In an embodiment of the present invention, the method may be applied to a triggered time division multiple access (TDMA) frame. Figure 3 An exemplary communication frame as provided in various embodiments of the present invention is shown. Time gaps are included during slave device transmission of data frames, which reduces EMC issues. Furthermore, the present invention ensures collision-free data transmission from several (two or more) slave devices (sensors, transmitters) to a master device (ECU, receiver). Figure 3 The communication frame includes:

[0056] - A master data frame generated and sent by the master device. In some embodiments, the master data frame includes a "start of frame" (SOF) byte. In some embodiments, the master data frame includes a synchronization pulse.

[0057] - One or more slave data frames generated by one or more slave devices and sent in an order that depends on the slave ID number, so for example, the slave with ID=2 is programmed to send after the slave with ID=1.

[0058] Each slave data frame includes a data packet having one or more data bytes, such as, for example, a data packet having sensor information to be transmitted to the master.The present invention includes gaps in at least one data frame that contain no information.

[0059] In some embodiments, the gap may be present at the beginning of the slave data frame before the first data byte of the data packet begins. In some embodiments, a gap may be included at the end of the data packet after the last data byte of the data packet. In some embodiments, there is a gap at the beginning of the data packet and a second gap at the end of the data packet.

[0060] The one or more gaps have a dependency on a duration or time length based on parameters stored locally in each of the at least one slave device. In some embodiments, to generate (203) the gaps, the parameters used to calculate the duration include a slave ID number that is unique to each slave device.

[0061] For more details, refer to Figure 3 , Figure 3 The figure shows communication between a master device and two sensors (slaves). The first data byte is generated by the master device ECU D0...ECU D6. This is the start of frame (SOF) byte. The first data bit of each byte generated and sent by the master or slave device contains the start of byte (SOB) information. The SOB bit further contains the data direction exchange information:

[0062] - SOB=0: Start of data requested by the ECU (SOF byte).

[0063] - SOB=1: MUART byte containing the data sent by the slave device.

[0064] The next 12 bytes are data bytes generated by the two slave devices (sensors). All data bytes generated and sent by a given slave device conform to the data packet for that given slave device. The data frame for that given slave device consists of the data packet and two gaps also generated and sent by that given slave device.

[0065] The data bytes carry information in the communication, while the gaps do not carry any information. The gaps are only used for collision avoidance in the communication frame.

[0066] exist Figure 3 In the example, the first slave device (Sensor 1) transmits a data packet comprising six data bytes (only the first and last transmitted data bytes are shown) and including a gap, followed by the transmission of a data packet by the second sensor (Sensor 2) comprising another six data bytes and a gap. In this particular example, each sensor transmits six data bytes, but in practice this number can also be higher. The slave devices do not need to transmit the same number of bytes; each slave device can transmit the number of data bytes it requires depending on the application. This can be achieved by maintaining the same time budget for all slave devices, where after the required data is transmitted by a given slave device, no data is to be transmitted by that slave device for the rest of the time budget, or by taking this data into account by an algorithm running in all slave devices to calculate the gaps accordingly.

[0067] for Figure 3 In the given example, the data packet of sensor 1 is data bytes 1...6, where each data byte carries an SOB bit and 7 data bits. The data frame of sensor 1 includes the data packet and additionally includes gaps GAP1a and GAP1b. GAP1a and GAP1b have a given time length based on parameters stored locally in the slave device (sensor 1). The time length or duration of these two gaps is also calculated in the slave device (sensor 1).

[0068] In some embodiments, the location of the gap (at the beginning of the frame or at the end of the frame or both) may depend on whether the frequency offset of the slave device is positive or negative, as will be explained with reference to FIG4. However, in some embodiments, a gap (GAP1a) is always included before the first data byte transmitted from the first transmitting slave device (Sensor 1) as shown. This allows for reducing the effects of any noise sources or bounces between the master and slave devices (e.g., one or more physical layers, as will be explained with reference to FIG4). Figure 6For explanation). In some embodiments, if there is a gap after the last slave device's data packet, the master device may respect the last gap or not, in which case the master device may initialize a new request after having received data from the last slave device without respecting the last gap. In other embodiments, such as in temperature sensing systems, where the transmission time is short compared to the detectable temperature change, the master device may include a predetermined time period before starting a new data / sync request in order to save energy and regardless of the presence of the last gap. In alternative embodiments, such as in applications with a fixed frame rate (with a pulse repetition rate for the synchronization / address SYNC / ADR bits), the repetition rate is in most cases based on a PWM generated signal. Since these signals are difficult to be stationary "on the fly", a very large gap (if any) may be left at the end of the communication to avoid a collision of the last slave data packet with the master device SYNC / ADR data.

[0069] Similarly, the second sensor (Sensor 2) transmits its data packet after Sensor 1's transmission completes. Sensor 2's data packet includes data bytes 1...6. These data bytes carry the SOB bit and seven data bits. Sensor 2's data frame includes the data packet and additionally includes gaps GAP2a and GAP2b. GAP2a and GAP2b are also calculated by Sensor 2 based on parameters stored locally in Sensor 2.

[0070] It is understood that a master device and several slave devices can be connected on the bus.Any number of slave devices can be connected, just be limited to the thermal effect of the slave device oscillator that may increase collision probability, and consider the communication efficiency according to the original position of every time unit, wherein the slave device / byte quantity is very high.Along with the increase of the number of slave devices, they must respond in the communication frame with more and more gaps (and more and more gap lengths according to some embodiments), so in practice, the optimal number of slave devices can be used according to required speed.In a preferred embodiment, 8 slave devices can be connected to master equipment at the most, therefore can complete transmission at a high speed, and comprise gaps in the data packets of each slave device.It is further understood that the data packet may include several bytes.In a preferred embodiment, it may be 1 ... 6 bytes.

[0071] In some embodiments, these gaps are generated by a given slave device's MUART and included in the data packets, where the time length of the gaps is calculated by the given slave device based on parameters stored locally in the given slave device.

[0072] Other alternatives can also be used, such as a PLL for data recovery that has a high implementation cost and is a SYNC training sequence or Manchester code. However, data efficiency is reduced. A fully bidirectional slave interface can be used, but each slave device requires higher accuracy to achieve a stricter frequency offset. Alternatively, each slave device can be triggered, which results in a loss of data efficiency. A remote trigger method can be used, but requires a slower data speed and may result in high implicit bit width variations and different propagation delays for rising / falling edges.

[0073] Gaps may be generated and introduced into the data packets taking into account parameters based on, for example, the frequency of the slave clock (such as a frequency offset). These parameters may be provided during calibration (204).

[0074] Figure 4 shows a complete communication frame, which includes a start of frame (SOF) indication sent by the master device, followed by a sequence of data frames sent by each slave device, the sequence of data frames including a gap and their corresponding data packets (which can be "Data Packet Slave 1 and Data Packet Slave 2" for a sensor). Data frames for only two slave devices are shown for four cases (the present invention is not limited to two slave devices):

[0075] - Figure 4A The resistor-capacitor oscillators (RCOs) of two slave devices are shown at the right side of the figure at nominal frequency.

[0076] - Figure 4A A worst-case scenario is shown for a first slave device with an RCO operating at a positive frequency offset (hence, a "fast slave") and a second slave device with an RCO operating at the nominal frequency.

[0077] - Figure 4B A worst-case scenario is shown on the right side of the figure with a first slave device having an RCO operating at a negative frequency offset (thus, a “slow slave”) and a second slave device having an RCO operating at a positive frequency offset (thus, a “fast slave”).

[0078] - Figure 4B A worst-case scenario is shown with a first slave and a second slave (both slaves are "slow slaves") operating at a negative frequency offset.

[0079] Other modes can be envisioned. The frequency of each slave device can be different.

[0080] Each data frame includes a data packet, which may consist of one or more UART bytes. The transmission time and time slot may be determined by time division multiple access (TDMA), and in an embodiment of the present invention, one or more gaps of a defined duration (or length of time) are inserted into each data frame of each slave device. The gap length and TDMA time slot are calculated based on one or more of the following parameters, in accordance with the clock period of the RC-oscillator, for example:

[0081] - Slave device ID

[0082] - Expected RC-oscillator frequency tolerance

[0083] -RC oscillator frequency

[0084] -UART baud rate (transmission speed)

[0085] -UART format (including multiple bits for start and stop indications: 8N1, 8N2, etc.)

[0086] - Physical layer TX / RX latency

[0087] - Number of UART bytes in the data packet

[0088] These parameters are stored in memory (eg, non-volatile memory in each slave device).

[0089] For example, at least the start of a gap is based on the slave ID, which determines the moment when a packet containing one or two gaps begins transmission. It is clear that each parameter that determines the gap is different for each slave. Furthermore, the clock system of each slave may differ from one another in practice, especially when the slaves are low-cost oscillators.

[0090] The following requirements are set for the defined time slots in which gaps are inserted into each slave device's data frame:

[0091] - Fast running slaves (positive frequency offset) should not access the bus during the last stop bit indicated by the Start of Frame (SOF). This will be covered by the GAP1a between the Start of Frame (SOF) byte and the first data packet.

[0092] - Fast running slaves should not access the bus until the slow running sensor (negative frequency offset) has completed its transmission / bus access. This is covered by GAP1b and GAP2a (GAP2b and GAP3a, GAP3b and GAP4a, ...) between each sensor data packet.

[0093] - The sum of all slow-running sensors should complete their transmission within the communication frame. This will be overwritten by the (last) GAPNb. The next communication frame initiated by the SOF byte sent by the master starts a new cycle.

[0094] In some embodiments, a unique slave ID is combined with an oscillator frequency or related parameters (such as offset), which may be unique to each slave device. Thus, each slave device can correctly place the gap at the right time during the appropriate duration and transmit data at the right time. The gap is based on the number of local oscillator clock ticks and the slave ID number.

[0095] The transmission of slave device data frames to the master device can be done sequentially so that each slave device communicates to the master device in an ordered sequence. In an embodiment of the present invention, the duration or length of time of the gap is customized to increase for each subsequent slave device. As previously explained, in some embodiments of the present invention, the gap can be calculated based on the slave device ID number, so that gradually increasing numbers in the sequence of slave device ID numbers result in gradually increasing gaps. In some embodiments of the present invention, the duration of the gap is customized to increase with the actual time in the communication frame (Tgap1<Tgap2<Tgap3<Tgap4<...), where Tgap1=GAP1a, Tgap2=GAP1b+GAP2a, Tgap3=GAP2b+GAP3a...., because the data frame sent by the master device has a pulse falling edge that serves as a fixed reference point for synchronization. It is advantageous for one or more slave devices to have enough space to provide collision-free transmission.

[0096] In some embodiments, the gap duration is incremented over time using a timer counter and a calculation in each slave device (eg, a processing unit in each slave device). This is provided by an iterative calculation that may use at least the slave device ID.

[0097] This process can be viewed as the cumulative effect of timing errors, starting with the falling edge of the master's SYNC / ADR signal until the start of the slave's transmission. This cumulative error increases over time. Therefore, the gap must also increase over time (by the number of slaves) to compensate for the timing error. This is precisely the iterative gap calculation shown in Figure 8.

[0098] The start time of each sensor's transmission can be calculated using a recursive algorithm. This algorithm can be tailored to the specific master-slave system. For example, in some embodiments that include a physical layer, latency from that layer can be taken into account. Thus, the start time of each sensor can be referenced to the local oscillator clock frequency and number of clock cycles of each slave device, respectively.

[0099] In the following, the second aspect of the present invention will be presented as a control system, and the specific implementation of the system and algorithm will be shown.

[0100] In a second aspect of the present invention, a master-slave control system is provided in which data transmission from a slave device to a master device reduces EMC issues and does not suffer from data collisions or self-collisions. For example, no synchronization device, such as a phase-locked loop (PLL), is required in the slave device.

[0101] Although the master device is assumed to be running on a stable time base (e.g., a highly accurate oscillator such as a crystal oscillator or dielectric resonator), a simple RC oscillator can be used in each slave device. In fact, any inexpensive oscillator, even one with poor frequency stability compared to a crystal oscillator, can be used in each slave device. In addition, simplified slave devices can be used because a complete receiver does not need to be implemented.

[0102] As explained previously, the general trend is to add elements to the communication system (e.g. by adding communication between slave devices, etc.) to improve the synchronization of bit transfer and clocks, thereby aiming to solve the problem of slippage between the master sampling event and the Tbits of the slave devices, such as Figure 5 As shown. The present system does not require these elements, and although the sensors are asynchronous and there may be a limited shift between the data bit transmission and the sampling event, it is limited to byte transmission. According to an embodiment of the present invention, elements of the system take into account parameters stored in the slave device (for example, taking into account the frequency offset of the slave device) to ensure that gaps are added between data packets, which "reset" mismatches and avoid data collisions.

[0103] These elements include, for example, a software program that, when executed in a processing unit of a slave device connected to a master device, is suitable for performing the method of the first aspect of the present invention. The software program may be suitable for reading the input of the slave device from the master device, so that after receiving an appropriate signal from the master device, the slave device can send data to the master device according to the method of the present invention. The type of data to be sent can be collected from other elements of the slave device. In some embodiments, the master device can send a command to a group of sensors acting as slave devices, thereby triggering these sensors to send collected measurement data, such as current, magnetic field measurement data, etc. to the master device. The present invention is not limited to these examples, and it can be other types of sensed data, or even other types of data.

[0104] In aspects of the present invention, a system for communicating between a master device and a slave device is provided. The system may include a master device and one or more slave devices, for example, the system may be a sensor system, for example, it may be part of a control system. One or more slave devices are suitable for communicating with the master device by generating and transmitting a slave device data frame, the slave device data frame including a data packet with at least one data byte and at least one gap with a variable time length, the gap not including information in the slave device data frame at the beginning of the slave device data frame (before the first data byte of the data packet begins) or at the end of the data packet (after the last data byte of the data packet ends). The gap has a time length dependency based on a parameter stored locally in each slave device in the at least one slave device. The master device is suitable for receiving the slave device data frame. In some embodiments, the data transmission from the slave device to the master device is triggered by a command sent by the master device to the slave device (for example, broadcast to all slave devices).

[0105] Figure 5 An exemplary control system (10) according to various embodiments of the present invention is shown. A motor controller (11) is combined with an electronic control unit ECU (12) that provides control signals, for example, to power the device. In this particular example, the ECU drives a brushless DC (BLDC) motor (16) and several slave devices (13, 14, 23) such as sensors connected to the ECU (12). For example, the slave devices (13, 23) may be current sensors (13) adapted to sense the phase currents of the BLDC motor. Further, a torque sensor or a rotor position sensor (14) may also be connected to the ECU. The ECU (12) and the sensors (13, 14) form a sensor system (20) within the control system (10). The sensors and the ECU are interconnected via a wiring harness (15) and form a differential asynchronous multi-sensor bus. In this bus architecture, the ECU fulfills the role of the master device (12), while all sensors perform slave functions. However, any other type of master control unit and slave devices may also be used.

[0106] As is known from the usual master / slave bus architecture, any communication is always triggered by the master. The trigger may be, for example, a synchronization pulse known in the art (e.g. as described in publication US2019 / 0028217A1, in particular paragraphs

[0029] -

[0038] ) or any other initialization means. In particular for TDMA, a time slot is a reference to a triggering event derived from a synchronization byte generated by the ECU, such as a Start of Frame (SOF) byte. For example, it may be a falling edge defined by a SOF frame as a function of the number of frames generated by e.g. Figure 3 The information requested by the ECU in the trigger is sent. Triggering is not the focus of the present invention.

[0107] Figure 6 A sensor system (20) according to an embodiment of the present invention is shown. It includes an ECU (12) as a master device and a slave device (23). In some embodiments, the system may further include a physical layer (24), for example, one physical layer for each slave device and one physical layer for the master device.

[0108] The physical layer itself may include a signal converter for converting the signals RX_Data (RX_ data), TX_Data (TX_ data) into DL1 and DL2. The physical layer is connected to the wiring harness (15) via data lines DL1 and DL2. In some embodiments, DL1 and DL2 may carry differential signals that are very robust to interference on the wiring harness. The interference may be, for example, electromagnetic interference. The physical layer has a common characteristic, namely that the communication between the master device and the slave device includes a delay. This delay is generally known, and it can be further used to calculate the maximum delay that the physical layer may cause. The physical layer may be a transceiver (such as a CAN transceiver) or an RS-485 layer, but the present invention is not limited to this.

[0109] More generally, in bidirectional (half-duplex) multi-sensor bus systems, the latency characteristics of the physical layer must be considered. The specific physical layer used must be considered within the available layers. For example, the CAN bus standard defines RX latency, TX latency, and loopback latency, as well as possible rising edge shifting when transitioning from dominant to recessive states, while RS-485 requires the definition of TX-RX turnaround time and RX-TX turnaround time for switching data direction at each node.

[0110] Several physical layers can be connected to the wiring harness (15) via DL1 and DL2, which further converts these signals into RX_Data and TX_Data and provides them to the slave device (23) in the sensor system (20). However, the presence of a physical layer is optional. For example, if only one sensor is connected to the ECU and if the wiring harness is very small and there are only short interconnections, the physical layer can be avoided. Such a configuration is certainly possible, for example, if the ECU and the sensor are located on the same printed circuit board (PCB). Even in this case, the present invention allows to reduce collisions due to signal bounce and the like.

[0111] In some embodiments of the present invention, the ECU (12) includes, for example, a UART (21) and a synchronization (Synch) pulse generation unit (22). The UART provides a transmission data signal TX_data to the physical layer (24). The UART further receives a reception data signal RX_data from the physical layer. The synchronization pulse generation unit generates, for example, synchronization pulses on the TX_data line to initiate communication from the ECU. The ECU further includes a high-precision oscillator so that the UART and the synchronization pulse generation unit operate with high precision. The tolerance of such an oscillator can be, for example, + / - 0.02% of the nominal oscillator frequency. In some embodiments, the oscillator is, for example, a crystal oscillator that serves as a clock (25) for the master device.

[0112] Figure 6 Only two sensors (23) are shown in FIG. In a preferred embodiment, the number of sensors may be between 1 and 8, but may also be higher. The sensors (slave devices) typically have different sensor identification numbers (IDs) so that communication can be established with the ECU (master device) in the correct manner without conflicts. In the case of only one slave device, the ID may not be used to provide gaps. For example, the oscillator frequency, its offset, etc. may be used to calculate the duration and position of one or more gaps. Gaps can still be provided to reduce the chance of EMC interference, for example due to signal bounce (e.g. due to the presence of a physical layer) to overcome delays in the communication line (wiring, receiver or transmitter delays, etc.). In the special case of using a physical layer (e.g. a CAN transceiver), bus access and bus transmission delays will exist even for a single slave device setup. The present invention allows these problems to be handled by adding gaps, rather than using a complex physical layer including separate RX / TX lines in a full-duplex system.

[0113] Figure 7 A slave device (23) is shown as, for example, a sensor according to an embodiment of the present invention. For example, the sensor may be any suitable sensor, such as the aforementioned current sensor or torque sensor. The sensor may sense or measure a physical parameter and may need to transmit this data at a given moment. Thus, the sensing aspect of the sensor is not important and is therefore not further calculated.

[0114] For the purpose of data transmission, the sensor is connected to the bus via a communication interface. For example, the communication interface may be a modified UART (MUART) (30).

[0115] In addition to its natural function of receiving data bytes and transmitting them to the bus, the communication interface is further configured to add gaps of variable duration to the communication according to embodiments of the present invention. A gap can be defined in the frame as a period in a given slave device's transmission sequence when there is no active signal on the sensor's transmission line TX_data. A gap has a start and end time point that define its duration or length.

[0116] exist Figure 7 In a specific embodiment, the sensor (23) acting as a slave device further includes a calculation and processing unit (31) which can be a programmable controller, a processor, a microprocessor, etc. The processing unit is suitable for calculating or determining the start time point and the end time point of the gap to be included in the communication, for example, by the MUART based on predetermined parameters. In some embodiments, a time counter (32) delivers a time base, which is further used by the calculation and processing unit (31) to calculate the gap. The time counter (32) can be included in the processing unit (31), although the present invention is not limited to this. In some embodiments, the MUART can be split into two blocks, a UART block and a multifunctional block. In this case, the multifunctional block includes the gap with information from the counter. The UART receives an enable bit or signal from the multifunctional block that calculates the gap. The next slave frame starts after the transmission of the previous slave frame ends or the end of its second gap, and the UART receives an activation signal again.

[0117] The sensor comprises a memory (33) arranged to receive and store predetermined parameters for calculating the gap. In some embodiments, the memory may be a non-volatile and (re)programmable memory (33), such as a read-only memory (ROM), an electrically erasable and programmable memory (EEPROM, flash memory) or a one-time programmable memory (OTP).

[0118] In some embodiments of the present invention, predetermined parameters can be received during one or more calibration steps using a MUART and provided to a non-volatile and programmable memory of a slave device (e.g., a sensor). In some embodiments, the predetermined parameters can be provided by a calibration interface (34) of the sensor. The present invention is not limited to these examples. For example, these parameters can be provided externally. For example, resistor encoding can be used. For example, the first PCB can include a 100 ohm resistor connected to the slave device (23) as a sensor, while PCB 2 can include a different resistor, such as 200 ohms, etc. The sensor can measure the resistance value with the aid of an ADC and derive its ID. Different implementations using capacitors with different capacitance values ​​can be used. In embodiments of the present invention, the slave device can include an input for introducing an ID. For example, the slave device in the IC can include 3 pins to which active voltage levels (000, 001, 011, etc.) can be applied, where 1 corresponds to the power supply of the slave device and 0 corresponds to ground, so that the binary code of the ID can be set externally.

[0119] In some embodiments, the sensor is arranged as an integrated circuit (IC).The IC may further have, for example, an architecture of a microcontroller, in which all said components of the sensor exchange information, addresses and data via an internal bus (36).

[0120] In some embodiments, at least some of these parameters are provided during a calibration step (e.g., on a semiconductor manufacturer's production line). Another portion of the parameters may be provided during end-of-line programming at the sensor system supplier. Thus, several calibration steps (e.g., only one calibration step) may be possible.

[0121] In some embodiments of the present invention, a portion of the parameters may have been stored in a read-only memory (ROM) during the manufacturing steps of the semiconductor manufacturer. Figure 7 Not shown).

[0122] In some embodiments, the slave device includes an inexpensive oscillator (such as an RC oscillator) as the slave device's clock (35), which provides the clock for all components of the system.

[0123] For example, an uncalibrated low-precision RC oscillator may have a tolerance of + / -60%, + / -30%, or + / -15% of the nominal target frequency. Through calibration, this variation can be reduced to a tolerance of + / -5%, + / -2.5%, or + / -1%. However, the tolerance of the slave device's RC oscillator with this calibration result is still significantly higher than the tolerance of the ECU's crystal oscillator (e.g., + / -0.02%).

[0124] The RC oscillator is arranged to be calibrated during the calibration step. Although the RC oscillator can be a low-precision oscillator (e.g., with an accuracy tolerance of + / - 2.5% or higher), the presence of the gap in the frame reduces or avoids data collisions without requiring complex communication or complex synchronization systems between the devices.

[0125] The following table presents specific algorithm implementations for the slave and control systems for each example of the preceding figures, as well as Figure 8A and Figure 8B The illustrated related iterative calculation scheme for the gap calculation performed by each slave device. In this particular example, the implementation is done on a sensor system, but the implementation can also be implemented on any other suitable slave system.

[0126] The algorithm (100) for determining the start of data transmission for each sensor includes an iterative loop. The number of consecutive iterations depends on the number of sensors attached to the bus. The algorithm can be executed in a slave device (for example, in a processing unit of the slave device). Table 1 gives specific examples of interface parameters that are part of the algorithm to provide a better understanding of the algorithm. Each step in the operational flow of calculation (100) refers to the row number and corresponding result in Table 1. The definition of the protocol is given by 8N1, 8N2..., which define the data bits, parity bits and whether they exist, etc., as is well known in the art.

[0127] Table 1: Example calculation of parameters stored locally in each slave device (sensor), including iterative loops

[0128]

[0129]

[0130]

[0131]

[0132]

[0133]

[0134] Algorithm (100) calculates the number of clocks required to span the time from a reference point (which may be the first edge of a communication packet from the master) to the time the sensor starts transmitting. Fast-running sensors with a positive frequency offset determine the start of a gap (i.e., the start of GAP1a, GAP2a, ...) with the calculated number of clocks. On the other hand, it can be seen that slow-running sensors with a negative frequency offset determine the end of a gap (i.e., the end of GAP1a, GAP2a, ...) based on the same number of clocks calculated by algorithm (100). The same method is applied to calculate the start and end of the gap inserted at the end of the transmitted data packet (i.e., the start and end of GAP1b, GAP2b, ...).

[0135] The process begins by reading the interface parameters (102) from a memory (e.g. EEPROM, OTP, ...). The length of the data packet of the master device is calculated (103) based on the interface parameters. In the presence of an external physical layer (24), additional delays may be included if applicable. For example, the slave device that transmits first may include a gap before transmitting the data packet to take into account any delays or interference introduced by the physical layer. It is also recommended to consider a worst-case bus configuration with a fast-running sensor without bus delay and a slow-running sensor with bus delay. This may introduce additional margin to avoid collisions.

[0136] In some embodiments, for example, an additional predetermined bus delay may be introduced for a slave device with a negative frequency offset, but no bus delay may be introduced for a slave device with a positive frequency offset. This can be used to compensate for the aforementioned physical layer delays (e.g., bus access time and RX / TX bus delays of a CAN transceiver). In some embodiments of the present invention, propagation delays may be taken into account and an additional predetermined bus delay may be introduced regardless of the offset of the slave device.

[0137] The calculated master data packet time is used to calculate the number of clock cycles that may be required to sample that time period by a fast operating sensor with a positive frequency offset (104).

[0138] The slave ID is then compared to the time slot, for example, the slave ID is compared to the current cycle period reflecting the time slot assigned to the slave, until there is a match (105). If the slave (e.g., sensor) is assigned to the first time slot, then the Slave ID matches ID=1 (105), then the number of clocks is immediately used to indicate the start of transmission for the first sensor (106). At this point, the process ends for the sensor with ID=1 (108). The start of transmission for the fast-running sensor defines the start of GAP1a and the start of GAP1b at the end of the packet. The start of transmission for the slow-running sensor defines the end of GAP1a and the end of GAP1b at the end of the packet.

[0139] The derived gap start and end points are stored in a non-volatile and programmable memory (33) or internal registers and will be used when the sensor transmits.

[0140] If the sensor is assigned to another time slot, so the ID is not 1 (slave ID ≠ 1) (105), the iterative loop process begins. The slave device goes through the following four steps in the iteration:

[0141] - Calculate (107) the number of clocks required for the slave to transmit its complete data packet from the falling edge of the master.

[0142] - A time period Tslow (Tslow) is calculated (109). Tslow is the period that a slow-running slave device will need to transmit its complete data packet.

[0143] - The number of clocks #clock is calculated (110). The parameter #clock is the number of clocks that the fast-running sensor will need to sample the complete slow-running sensor's data packet time, added to the result from any previous steps (e.g., steps 104, 110 of the previous iteration).

[0144] - An internal counter is incremented (111), generating the next time slot, which is again compared with the slave ID (105) to obtain whether there is a match or not, closing the loop.

[0145] The clock numbers #clock are stored in memory (33) or in internal registers. They are used when transmitting from the device. Specifically, they can be used to determine the start of each transmission from the device.

[0146] If the slave ID matches the allocated time slot, the calculated number of clocks is used to indicate the start of its transmission (106) and continuously ends (108) the calculation process.

[0147] For the fast-running sensor, the clock number again leads to the start time of GAP2a and GAP2b, and for the slow-running sensor, to the end time of GAP2a and GAP2b.

[0148] The start of the transmission is completed within the slave device frame. When the start of the transmission occurs after the start of the frame, it can be said that a gap is generated before the data transmission. When the transmission is completed before the end of the frame, then a gap is generated after the data transmission. This is determined for each slave device when determining Tslow and the number of clocks. It can be seen that the number of clocks is obtained by adding the complete absolute time of the slow-running sensors, but the number of clocks is applied to the fast-running sensors. It should also be noted that since the number of clocks in each iteration increases, a slave device with a larger slave device ID than the previous slave device will accumulate a larger #clock (number of clocks). In other words, in this exemplary algorithm, one or more gaps of each subsequent slave device increase in size. This advantageously provides a lower chance of data collision when the number of slave devices increases with potential accumulated desynchronization. However, the present invention is not limited to this exemplary algorithm.

[0149] As a conclusion, this is also true for all subsequently calculated slave IDs and their time slots (GAPNa and GAPNb).

[0150] The algorithm has been explained in FIG8 and Table 1, which assumes that the slave devices transmit the same number of bytes. However, as mentioned previously, different slave devices may transmit different numbers of data bytes. In such cases, after the requested data transmission is completed, no data transmission is performed in the remainder of the time budget. Alternatively, the length of the data packet can be taken into account when calculating the gap and the algorithm can be adjusted. For example, the length can be flexibly calculated and stored for each sensor during the calculation of the clock (107), so that the calculation of the gap takes the number of bytes into account. The gap and data transmission start / end are based on the clock pulses counted after the synchronization pulse from the master device is received.

[0151] In summary, in a specific exemplary implementation, to which the present invention is not limited, each slave device calculates the start of its communication based on its ID. The gap at the start of each data frame is established by a given slave device during the cycle (calculation of clock (107), calculation of Tslow (109)). When a data packet is sent, a given slave device has completed sending data, and the next slave device has not yet started its data frame. The time spent between the end of the transmission of a given slave device and the start of the data frame of the next slave device conforms to the gap at the end of the data frame of the given slave device. In some embodiments, at the end of a communication frame, the gap at the end of the last slave device data frame may be disregarded and the master device may start a new cycle when the last slave device receives the last data bit.

[0152] It will be appreciated that instead of an iterative calculation scheme, an algorithm based on a lookup table may be used. Such a table may be based on a parameter matrix stored in a non-volatile memory of each slave device and provided to the slave devices during one or more calibration steps, and the calculation and processing unit (31) of each slave device may determine the time of the gap to be included in the data frame of each sensor.

[0153] The slave device calibration may be performed in a finite number of steps (204), for example, one or two. The calibration values ​​may be used to calculate the gap, such as Figure 2 shown.

[0154] A preferred embodiment for calibration may be, for example, providing (204) a parameter matrix to the slave device in a first calibration step. This step may be performed on the production line of the sensor supplier or semiconductor supplier. For example, this may be done if the sensor is provided as an integrated circuit (IC).

[0155] A parameter matrix can be defined as a plurality of parameters, wherein the relationship between several parameters is defined. For example, the clock frequency of a slave device (e.g., the frequency of an RC oscillator) can be stored together with the temperature at which the oscillator is actuated at the corresponding frequency. Instead of storing only the frequency of one RC oscillator, several RC oscillator frequencies are stored together with the temperature. The slave device can be provided with an internal temperature sensor. For example, it can be provided in an integrated circuit forming the slave device. Depending on the reading of the internal temperature sensor, a suitable RC oscillator frequency can be selected for the slave device, for example, matching the closest oscillator frequency at the measured temperature. Other parameter combinations may also be possible.

[0156] To provide the (204) parameters, a calibration can be performed on the supplier's manufacturing line. For example, a second calibration step (204) can be performed on the system supplier's manufacturing line, where data and addresses can be assigned to the sensors. For example, the sensors can only receive a sensor ID number, which is also part of the parameters used to calculate or determine the gap as previously shown. An advantage of this embodiment for calibration is the simplicity of this calibration step.

[0157] In an embodiment of the invention, only one calibration step is performed, for example where the drift of the oscillator with temperature is known. However, more than one calibration step may be performed.

[0158] For example, it is possible to perform a calibration at an IC temperature of, for example, 150° C. With the known temperature behavior of the oscillator, the frequency at, for example, 25° C. can be calculated. The frequency calculated at 25° C. can be written to a memory.

[0159] Optionally, further steps can be performed, for example using a second temperature. For example, it is possible to calculate the frequency at both 150°C and -40°C. In this case, it is not necessary to know the drift behavior in advance to calculate the temperature drift. The values ​​of the two calibration points can be taken, and the oscillator frequency at 25°C can be calculated. The calculated frequency can also be written to the chip's memory.

[0160] In a third calibration step, for example at the sensor system supplier on eg another manufacturing line, an ID may be assigned.

[0161] The calculation of the gaps to be included in the data frame of the communication frame can be performed by the slave device at several moments. A calibration value can also be taken into account:

[0162] - It can be performed after each synchronization initiated by the master by sending a SOF byte. Temperature drifts can be advantageously compensated. In addition, long-term drifts of the RC oscillator frequency (not included in the tolerance band) can also be compensated.

[0163] - This calculation can be performed every time after the sensor is powered on. This is a preferred embodiment, as this is part of the sensor initialization routine.

[0164] The calculation may be performed when the slave device is first powered on. The calculated gap time is also written to a memory (eg non-volatile memory).

[0165] In summary, with gaps in data frames transmitted by the slave device, fast communication of, for example, 4 Mbit / s can be transmitted to a master device running on a crystal oscillator with a tolerance of, for example, + / - 0.02%, using, for example, a 20 MHz RC oscillator with a tolerance of, for example, + / - 2.5%.

[0166] It is also shown that the gap depends on parameters stored locally in each slave device in a memory (e.g., EEPROM). Each slave device can use these parameters to calculate the gap using an iterative calculation scheme. These parameters have been provided to the slave device in one or more calibration steps.

Claims

1. A method for communicating between a master device (12) and a plurality of slave devices (13, 14, 23), comprising generating (200) a communication frame, said generating the communication frame comprising generating (201) a slave device data frame for each of said plurality of slave devices, wherein generating (201) said slave device data frame comprises: - generating (202) a data packet comprising one or more data bytes, and - generating (203) at least one gap of variable time length, said gap comprising no information in said slave data frame at the beginning of said slave data frame before the beginning of a first data byte of said data packet or at the end of said data packet after the end of a last data byte of said data packet, wherein the gap is calculated based on a time length dependency based on a parameter stored locally in each of the plurality of slave devices, wherein the method further comprises obtaining (102) a frequency offset for each slave device, then including a predetermined bus delay for slave devices having a negative frequency offset and excluding a bus delay for slave devices having a positive frequency offset, wherein the variable time length of the gap is tailored to increase for each subsequent slave device.

2. The method according to the preceding claim, characterized in that Generating (201) the slave device data frame includes generating a first gap and a second gap having variable time lengths at the beginning and the end of the data packet, respectively.

3. The method according to any one of the preceding claims, characterized in that One of the parameters locally stored in each of the plurality of slave devices is a slave ID number that is a unique identifier of each slave device.

4. The method of claim 1 or 2, further comprising generating a time base for calculating the at least one gap, wherein the timing of the slave device data frame is based on a clock having a nominal target frequency tolerance of less than 5%. 5 . The method of claim 1 , further comprising generating and transmitting start of byte (SOB) information having a first data bit, the first data bit further comprising data direction swap information.

6. The method according to claim 1 or 2, wherein: The parameters are provided (204) in at least one calibration step.

7. The method according to claim 1 or 2, wherein: Generating (201) the slave data frame is performed during an initialization routine of the slave device.

8. A software program product adapted to perform the method of claim 1 when being executed in a processing unit of a slave device connected to a master device.

9. A system for communicating between a master device (12) and a plurality of slave devices (13, 14, 23), each of the plurality of slave devices being adapted to generate a slave data frame, wherein the slave data frame comprises - a data packet, said data packet comprising one or more data bytes, and - at least one gap of variable time length, said gap comprising no information in said slave data frame at the beginning of said slave data frame before the beginning of a first data byte of said data packet or at the end of said data packet after the end of a last data byte of said data packet, wherein the gap has a time length dependency based on a parameter stored locally in each of the plurality of slave devices, The system further comprises a master device (12) adapted to sequentially receive the slave device data frame from each slave device, the system adapted to obtain a frequency offset for each slave device, then include a predetermined bus delay for slave devices having a negative frequency offset and exclude a bus delay for slave devices having a positive frequency offset, in, The system is configured to increase the variable time length of the gap for each subsequent slave device.

10. System according to the preceding claim, characterized in that The master device (12) includes a clock (25) having a tolerance lower than 0.05%, and the slave device includes a clock (35) having a lower accuracy than the clock of the master device, for providing a high-speed and cost-effective system.

11. The system according to claim 9 or 10, characterized in that The plurality of slave devices (13, 14, 23) are sensors, and the master device (12) is a master control unit.

12. The system according to claim 9 or 10, characterized in that The slave device (13, 14, 23) is adapted to run a software program product as claimed in claim 8.

Citation Information

Patent Citations

  • Robust high speed sensor interface for remote sensors

    US20190028217A1

  • Edge-based communication with a plurality of slave devices using timers

    US20190199558A1