US9798684B2 - Bus communications with multi-device messaging - Google Patents
Bus communications with multi-device messaging Download PDFInfo
- Publication number
- US9798684B2 US9798684B2 US14/691,707 US201514691707A US9798684B2 US 9798684 B2 US9798684 B2 US 9798684B2 US 201514691707 A US201514691707 A US 201514691707A US 9798684 B2 US9798684 B2 US 9798684B2
- Authority
- US
- United States
- Prior art keywords
- address
- slave
- register
- virtual
- virtual device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active, expires
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/36—Handling requests for interconnection or transfer for access to common bus or bus system
- G06F13/362—Handling requests for interconnection or transfer for access to common bus or bus system with centralised access control
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
- G06F13/4291—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a clocked protocol
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0016—Inter-integrated circuit (I2C)
Definitions
- the present application generally relates to a communications bus and, in particular, to a communications protocol for obtaining data from multiple devices.
- I 2 C Inter Integrated Circuit
- One of the drawbacks of the I 2 C protocol is that there is significant signaling overhead if the message being read or written is short in number of bits.
- the protocol control overhead cost can overwhelm the size of the data being read or written resulting in an inefficiency in the transfer rate of 3-4 times as compared to a situation where only the original device data was sent and without any control information as required by the protocol.
- FIG. 1 diagrammatically shows one example of a multi-device two-wire bidirectional communications bus
- FIGS. 2A and 2B show an example structure for a write operation and an example structure for a read operation, respectively, on an I 2 C-compliant bus;
- FIG. 3 shows a simplified block diagram of an example master device and an example slave device
- FIG. 4 diagrammatically shows aliasing between virtual device registers and slave device registers
- FIG. 5 shows, in flowchart form, one example method for communicating on a bus
- FIG. 6 diagrammatically illustrates an example structure for a read operation in accordance with one aspect of the present application
- FIG. 7 shows an example method for communications between a master device and a plurality of slave devices on a communications bus with a common data line
- FIG. 8 shows another example method for communications between a master device and a plurality of slave devices on a communications bus with a common data line
- FIG. 9 diagrammatically illustrates an example structure for virtual wire communications
- FIG. 10 shows, in flowchart form, an example method for virtual wire communications
- FIGS. 11A and 11B show example messages structures that include multiple individual slave ACK responses in a single message.
- FIG. 11C shows an example message structure in which the slave devices send ACK bits during a read rather than the master device.
- the present application describes a method of a master device reading from or writing to a plurality of slave devices connected to a communications bus having a one or more common data lines, each slave device having an associated slave device address.
- the method includes providing each of the slave devices with a virtual device address different from any of the slave device addresses; initiating, by the master device, a communication on the bus by signaling a start of the communication followed by the virtual device address on the data line; the slave devices detecting the start of the communication and the virtual device address and, in response, identifying a register in that slave device associated with the virtual device address, and, each slave device, in sequence, performing a bus read/write operation with regard to its identified register in a respective predetermined time slot within the communication on the data line; and terminating, by the master, the communication by signaling an end of the communication.
- the present application describes a bus communication system including a master device; a plurality of slave devices, each slave device having an associated slave device address and storing a virtual device address different from any of the slave device addresses; and a communications bus having a one or more common data lines interconnecting the master device and the plurality of slave devices.
- the master device is to initiate a communication on the bus by signaling a start of the communication followed by the virtual device address on the data line.
- the slave devices are to detect the start of the communication and the virtual device address and, in response, identify a register in that slave device associated with the virtual device address, and, in sequence, perform a bus read/write operation with regard to its identified register in a respective predetermined time slot within the communication on the data line.
- the master device is to terminate the communication by signaling an end of the communication.
- the present application describes non-transitory computer-readable media storing computer-executable program instructions which, when executed, configured a processor to perform the described methods.
- the term “and/or” is intended to cover all possible combination and sub-combinations of the listed elements, including any one of the listed elements alone, any sub-combination, or all of the elements, and without necessarily excluding additional elements.
- the phrase “at least one of . . . or . . . ” is intended to cover any one or more of the listed elements, including any one of the listed elements alone, any sub-combination, or all of the elements, without necessarily excluding any additional elements, and without necessarily requiring all of the elements.
- registers used herein in intended to be interpreted broadly as referring to addressable memory locations. It is not intended to be limited to particular types of memory structures, or specific integrated circuit memories. Although in some cases, a register may be implemented using discrete hardware memory component, in some cases it may be implemented within memory integral to a processing unit or other controller. In this sense, references to reading from or writing to a register in a slave device may refer to a specific portion of any memory that may be accessed using a memory address. References to a register may refer to an 8-bit memory location (a byte) in some embodiments, but may be other sizes in other embodiments.
- virtual device used herein is intended to be interpreted broadly as referring to a programmable device address that can be assigned as an alternate device address to a device thereby making a device able to respond to this alternate device address.
- aliasing data is intended to be interpreted broadly as reading or writing to the virtual device address and having one or more devices translate the register address that is being accessing when communicating to the virtual device to same or other register addresses within the individual devices that responds to the virtual device address.
- I 2 C-bus communication protocol and backward compatibility with that protocol, it will be appreciated that some embodiments may conform to and/or be backward compatible with other bus communications protocols, including the I 3 C protocol sensor bus (SensorWire) as developed by MIPI (Mobile Industry Processor Interface Alliance).
- I 2 C-bus is a bidirectional 2-wire bus that has become the de facto control bus standard. One wire is used for the clock and one wire for data.
- I 2 C-bus (hereinafter I 2 C) is described in “I 2 C-bus specification and user manual”, UM10204, Rev.6, Apr. 4, 2014, NXP Semiconductors N.V., the contents of which are hereby incorporated by reference.
- I 2 C structure provides that a master device on the bus first initiates a communication with a start symbol (in the case of I 2 C, a high-to-low transition on the data line while the clock signal is high). It follows the start symbol with a 7 or 10 digit slave device address, followed by a bit indicating either a read or write command. This is then acknowledged by the slave device, following which data is put on the bus by either the master (in the case of a write) or the slave (in the case of a read). Each byte is acknowledged by either the slave or the master, respectively. To end a communication sequence, the master sends a stop symbol.
- start symbol in the case of I 2 C, a high-to-low transition on the data line while the clock signal is high. It follows the start symbol with a 7 or 10 digit slave device address, followed by a bit indicating either a read or write command. This is then acknowledged by the slave device, following which data is put on the bus by either the master (in the case of a write) or the slave (
- the read and write operations further specify a register address within the specific slave device.
- This communications protocol can result in the requirement of transferring over 26 bits of header data in order to read a single byte of information from a slave register. In such cases, the protocol is very inefficient with respect to the transfer efficiency due to the protocol overhead.
- a master device such as a controller, a processor, or other such integrated circuit device, may periodically sample a number of sensor devices to implement continuous monitoring. This regular polling of a selected number of addresses may result in a large transfer overhead comparted to the quantity of data being read.
- I 2 C provides for the ability to read/write multiple registers in a slave device within one message, i.e. within one header/trailer. However, this mechanism is limited to the case where the registers are all sequentially addressed and all in the same slave device.
- I 2 C further provides a mechanism for writing to all devices at once using the global address 0000000, however this mechanism is primarily targeted at resetting the slave devices on the bus.
- the usefulness of this mechanism for a broadcast write operation is limited to the case where all slave devices are being updated with the same data to the same register address. Except for special corner cases, it cannot be used for a read operation because the slave devices would overwrite the combined response.
- FIG. 1 diagrammatically shows an example of a two-wire bidirectional bus architecture 10 .
- the bus architecture 10 includes at least one master device 12 connected to a data line 14 and a clock line 16 , such as, for example, the SDA line and SCL lines in I 2 C. Only one master device 12 is shown in this example.
- Slave devices 20 may include any number of electronic devices of varying complexity. Non-limiting examples include A/D and D/A converters, I/O ports, RAM, EEPROMs, smart cards, tuning circuits, modems, temperature sensors, pressure sensors, light sensors, accelerometers, gyroscopes, magnetometers, other sensors, switches, drivers, clocks, etc.
- the data line 14 and clock line 16 may be connected to a positive voltage supply through, in some examples, pull-up resistors 22 .
- a PMOS transistor or other active device 21 may be placed between the pull-up resistors and the bus to be able to disable these resistors, if special communication schemes are used, e.g. NRZI (Non Return to Zero Inverted), DDR (Dual Data Rate, uses both clock edge for transfer) or tri-symbol encoding (transmitting information based on two data lines and using any data change as an indication of a corresponding clock change) as described in MIPII 3 C SensorWire bus protocol. This enables the bus to be backwards compatible with older open-collector/open drain topologies and be forward compatible with newer schemes such as NRZI.
- FIGS. 2A and 2B illustrate an example structure for a write operation 50 and an example structure for a read operation 70 , respectively.
- These example operations 50 , 70 illustrate communications on an I 2 C-compliant bus.
- the contributions of the master device 12 ( FIG. 1 ) are shown in shaded portions and the contributions of the slave device 20 ( FIG. 1 ) are shown in unshaded portions.
- an I 2 C slave device address may have 10-bits, but normally a 7-bit address.
- Other bus communications protocols may permit addresses of other lengths.
- the message starts with a START event (‘S’) and ends with a STOP event (‘P’).
- S START event
- P STOP event
- Sr REPEATED START event
- a read/write bit that specifies whether the master is conducting a read or a write command.
- logical zero indicates a write command and logical one indicates a read command.
- the write selection is used at the first stage of the communication both for the write operation 50 and the read operation 70 because the read operation 70 involves first specifying the specific register using a write command followed by a re-start and then performing the actual read operation.
- the slave device addressed by the communication then responds with acknowledge bit (or, a not acknowledge bit).
- the acknowledge bit (ACK) is sent by the slave device by pulling that data line low.
- a “not acknowledge”, or NACK, bit is communicated by leaving the data line high (which would occur if the device is simply non-responsive or if an error has occurred).
- the master device Presuming that the communication was acknowledged by the addressed slave, the master device then sends the register address that is to be read from or written to. In the case of the write operation 50 , this is followed by an ACK bit from the slave device and the master then sends the data to be written to the register. Each byte of data to be written to the register is acknowledged by an ACK bit from the slave device.
- the master sends a stop symbol to signal the end of the communication.
- the master device After sending the register address and receiving an ACK from the slave device, the master device sends a repeated start symbol (a resending of a start symbol before conclusion of the communication) followed by the slave device address again. This time, the slave device address is followed by a read bit to signal that the previously provided register address is to be the subject of a read command. This is acknowledged by the slave device, which then outputs the register contents corresponding to the register address. The master then acknowledges the register data with an ACK or NACK symbol. The ACK symbol from the master device indicates that a further byte of register data should be output by the slave device. When performing multiple read operations, the further byte of register data is the next byte in the register addressing sequence, i.e.
- a merged messages mechanism may be implemented by the master device and participating slave devices in order to read from or write to multiple slave devices within one message, thereby reducing the overhead associated with multi-device read/write operations.
- the data for individual slave devices among those participating slave devices is multiplexed into time slots assigned to individual devices to form a single long message.
- the time multiplexing may be based on a predetermined sequence or selected as one of a set of several possible predetermined sequences, in some embodiments.
- Provided the combined multi-device message uses the usual header and trailer, it will appear as a compliant bus communication, such as an I 2 C communication.
- a “virtual slave address” is defined and communicated to the participating slave devices.
- a virtual slave register or registers may be defined and each one mapped or aliased to a real register of a corresponding real slave device.
- a single message or communication begins with a start symbol and ends with a stop symbol.
- the message or communication is a multi-device communication if it uses a virtual device address and more than one slave device is responsive to the virtual device address in a time-multiplexed sequence.
- FIG. 3 shows, in block diagram form, an example master device 112 and an example slave device 120 .
- the example master device 112 and slave device 120 are connected by a two-wire communications bus with data line 14 and clock line 16 .
- data line 14 and clock line 16 are connected by a two-wire communications bus with data line 14 and clock line 16 .
- FIG. 3 shows only one master device 112 and one slave device 120 is illustrated in FIG. 3 for ease of illustration, it will be appreciated that many embodiments will feature a plurality of master and/or slave devices connected to the same communications bus.
- the master device 112 includes a processing unit 118 , a memory 116 , and a physical bus interface 114 .
- the physical bus interface 114 may include circuitry for connecting to and manipulating the communications bus.
- the circuitry may include flip flops, buffers, glitch removal circuits or other components for both correctly detecting voltage, symbols and/or pulse edges on the bus and for asserting symbols, voltage and/or pulse edges on the bus.
- the physical bus interface 114 allows master device 112 to pull either or both of the data line 14 and clock line 16 to translate from a high DC voltage to a low DC voltage or vice-versa under the operative control of the processing unit 118 .
- the master device could translate between systems running on voltages of 1.8V and 3.3V.
- the processing unit 118 may include one or more processors for controlling operation of the master device 112 .
- the processing unit 118 may include a microprocessor or microcontroller operating under control of processor-executable program instructions that cause the processing unit 118 to carry out one or more operations in reading and or writing to the slave device 120 via the bus.
- the memory 116 may be integral to the processing unit 118 or separate therefrom. It may include more than one memory.
- the memory 116 may include volatile and/or non-volatile memory locations for storing data and/or processor-executable program instructions.
- the slave device 120 includes a processing unit 122 , a physical bus interface 124 and registers 126 .
- the processing unit 122 may be implemented using a microprocessor, microcontroller, field-programmable gate array, EEPROM, application-specific integrated circuit, discrete logic components implementing a control process, or other such devices.
- the processing unit 122 includes integrated or discrete memory containing processor-executable program instructions that, when executed, cause the processor to carry out certain functions or operations, which may include the functions or operations for bus communication described herein.
- the registers 126 are addressable memory locations capable of storing data. Normally, at least some portion of the registers 126 is capable of being both read from and written to by the master device 112 and/or slave device 120 .
- the slave device 120 may include a variety of other components for implementing its intended function, such as, but not limited to, various sensors (not shown) for obtaining data that is then stored in one or more of the registers 126 .
- FIG. 4 shows, in block diagram form, an example embodiment of the registers 126 of the slave device 120 ( FIG. 3 ) and the mapping to the registers 136 of a “virtual” device.
- each byte-sized data location has an address.
- the virtual device register addresses are, for example, addresses M, M+1, M+2, etc.
- the slave devices store data in one or more registers that may be read from or written to by the master device.
- the registers 126 show Slave 1 Register 1 , Slave 2 Register 2 , etc.
- the slave device may store a correspondence between one or more virtual device register addresses and one or more of the slave device's registers. This may be termed “aliasing” data.
- the aliasing data may be provided by a master device. In this example, the aliasing data specifies that virtual device register address M is correlated to Slave 1 Register 1 .
- the registers 126 may also store aliasing data specifying that virtual device register address M+1 maps to slave register address Slave 1 Register 2 .
- the aliasing data relating to other slave devices may or may not be stored at Slave 1 in some embodiments.
- the combined message may involve transfers from one slave device, in other implementations from more than one slave device.
- the slave device memory may contain sequence data 150 , which defines one or more selectable sequences of slave devices and/or slave device registers to be read from or written to by a master device in a single message using the virtual device address.
- the sequence data 150 may define a state machine in some embodiments. Example implementations involving predefined sequences will be described further below.
- FIG. 5 shows, in flowchart form, one example method 200 for communicating on a bus, wherein the bus interconnects one or more master devices and a plurality of slave devices. Each slave device has its own unique slave device address.
- the communications bus is an I 2 C bus.
- a subset of two or more of the slave devices are associated with a virtual device address.
- the virtual device address differs from any of the slave device addresses.
- the master device uses the virtual device address when the master device wishes to read from or write to each of the slave devices in the subset in one communication.
- the association may be configured in the subset of slave devices by writing the virtual device address to a designated register in each slave device of the subset.
- the subset of slave devices may be preprogrammed with the virtual device address.
- operation 202 may further include storing aliasing data for one or more registers of one or more of the slave devices.
- the slave device associates the virtual device address with a specific register in its memory without the need for additional aliasing data.
- the slave device may store aliasing data mapping one or more virtual device address registers to one or more real slave device registers.
- the master device evaluates whether it is required to initiate a communication on the bus. If so, then in operation 206 , the master device determines whether a multi-device message is required. If not, then regular I 2 C communications are implemented, as indicated in operation 208 . But if multi-device message is determined to be required, then in operation 210 the master device selects a virtual device control scheme. In some instances, the master device may have more than one control scheme from which to choose. For example, different virtual device addresses may correspond to different (possibly overlapping) subsets of slave devices or different registers in the subset of slave devices, and the selection may depend on which slave devices need to be read from or written to. In another example, different virtual device addresses may correspond to different sequences of reading/writing and/or different state machines for carrying out a multi-device read/write operation. The different sequences may correspond to different subsets of slave devices and/or slave registers.
- the master device initiates and carries out the selected communication on the bus.
- the master determines whether to deactivate the bus in operation 214 and, if so, then deactivates the bus in operation 216 .
- FIG. 6 diagrammatically illustrates an example structure 250 for a read operation in accordance with one aspect of the present application.
- This example structure 250 is based upon an embodiment in which at least one slave device contains aliasing data mapping a slave device register to a virtual device register address.
- the example structure 250 for the communication begins with a start symbol output by the master device, which initiates the communication. This is followed by the virtual device address and a read/write bit. In this example, a write bit appears, which is then followed by an ACK bit from the slave devices that recognize the virtual device address. Note that all slave devices in the subset, i.e. that recognize the virtual device address, provide the ACK reply. That is, each of the slave devices in the subset pulls the data line low. If one of the devices in the subset is inoperative, it's failure to ACK the virtual device address will go undetected as long as at least one of the slave devices in the subset pulls the data line low.
- a virtual register address is provided by the master device.
- the virtual register address is received by the slave devices of the subset, which then consult aliasing mapping data (or a sequence selection logic) to determine which real slave register is mapped to the virtual register address.
- the slave devices in the subset send an ACK (in this example, all slave devices in the subset that map to the virtual device address respond with ACK, and not just the slave device that contains the real slave register corresponding to the virtual register address, to remain compatible with I 2 C protocol.)
- the slave registers are mapped to a sequence of virtual register addresses.
- the master device may then consecutively read each of the different slave devices/registers in a single message because they are mapped to a sequential set of virtual register addresses.
- the master device may elect to start with a virtual register address other than the numerically lowest one, provided the master device does not need to read the slave registers corresponding to the lower virtual register addresses (since the repeated read operation will read consecutive registers from a starting point and increment upwards in address).
- the master device sends a repeated start symbol followed by the virtual device address again and a read bit.
- This is ACK′d by the slave devices of the subset, which then, in sequence in accordance with the aliasing data, begin providing data from the aliased slave device registers.
- the slave device register that corresponds to the virtual register address provided earlier in the communication is read and its contents put on the bus. If the master device intends to continue reading slave device registers in sequence, the master device responds with an ACK.
- the slave devices that are part of the subset understand that this signifies the end of the first read and increments the internal virtual register address.
- the aliasing information provides a mapping between the virtual register addresses and specific slave device/slave registers combination. That slave device then outputs the corresponding register data to the bus. The read sequence continues until the master device sends a NACK (leaves the data bus high) and then terminates the message with a stop symbol.
- the structure may be modified to address the fact that all the slave devices send an ACK to the virtual device address, thereby preventing the master device from knowing if one of the slave devices is incapacitated.
- the structure provides for one or more bytes near the beginning or end of the transmission in which each of the slave devices sends an ACK in a predefined sequence so as to signal that each device is active and available. In this way, the master can determine if all devices are responding to the message.
- FIG. 11A shows one example structure 252 of a message in which an individual sequence of acknowledgements is provided by the slave devices.
- the master may initiate a combined message but, when the message is directed to a single device only, this way the ACK condition could be unique.
- the bit in the response (e.g. the first or last bit in each response) from each individual device will signify if the device acknowledged the virtual device address or not.
- FIG. 11B shows an example structure 254 of a message having such a feature. This structure may be simpler to implement than adding a header with a combined ACK response.
- the master ACK bit in a read sequence may be replaced by a slave ACK bit instead.
- the driver of the ACK bit may be a slave device, instead of the master, after the read is performed from that slave. This will still work with the end of a message if a finite pre-programmed sequence is used to control the read, because the slave devices will know when the last device has responded or the last register has been read. Therefore, there is no need for the master to send a NACK and thereby disable devices from sending any more data. Otherwise, and in the normal case, the slave would need the NACK from the master in order to stop sending register data and guarantee the master is able to send a STOP (‘P’) symbol.
- P STOP
- the last ACK time slot may be signaled as an NACK instead for backwards compatibility.
- FIG. 7 shows one example method 300 for communications between one or more master devices and a plurality of slave devices on a communications bus with a common data line.
- the method 300 uses the multi-device communication structure 250 described in connection with FIG. 6 . That is, the method 300 uses aliasing data to map virtual device registers to corresponding slave device registers.
- the virtual device address V is stored in subset of slave devices.
- the subset includes all slave devices on the bus, but in other embodiments, it includes one or more but fewer than all of the slave devices on the bus.
- Each slave device that is part of the subset is configured to respond to its own slave device address (S 1 , S 2 , . . . , S N ) and to the virtual device address (V).
- Aliasing data is stored inside each slave device in the subset. In some embodiments, only the aliasing data relating to a slave device register local to a specific slave device is stored at that slave device. In this embodiment, the aliasing data maps a series of sequential virtual device addresses to slave device addresses. As an example, the aliasing data may specify:
- Slave Device Slave Register Address Virtual Register Address S 1 00101000 00000110 S 2 00100010 00000111 S 2 00010001 00001000 S 3 01000101 00001001 S 4 01110010 00001010 S 5 00000100 00001011
- the master device initiates a communication on the bus with a start symbol followed by the virtual device address V.
- the master device then indicates read or write, receives an ACK from the slave devices that correspond to the virtual device address, and indicates a first virtual register address.
- the virtual register address may be the first address in the sequence of virtual register addresses in many embodiments (e.g. 0000110, in the above example). This is then again followed by an ACK from the slave devices.
- Operations 306 and 308 reflect that the master device will send a repeated start symbol followed by the virtual device address if the master device is performing a read operation, as typically implemented using the I 2 C protocol.
- the master device performs the multi-device read or write operation.
- Operation 310 first includes conducting the read/write with respect to the virtual register address referenced in operation 304 , as shown by operation 312 . If the master device is performing a read operation, then in operation 312 the slave device that has the slave register that maps to the virtual register address outputs the data from that register onto the bus in that timeslot. If the master device is performing a write operation, then in operation 312 the master device puts the data to be written on the bus in that timeslot, and the corresponding slave device writes that data to the slave register that map to this virtual register address. In some embodiments only a single device is being addressed during operation 310 , this has the advantage that reading or writing from multiple independent register locations can quickly be performed while still getting a unique ACK response from the single device.
- the master device determines whether the multi-device read/write operation is completed. If not, then in operation 316 the virtual register address is incremented automatically inside the master and slave devices, the master sends an ACK (in case of read), and operation 312 is repeated, but with respect to the incremented virtual device address, which the aliasing data may map to a different slave device and different slave device register.
- the master device When a multi-device read operation is completed, the master device outputs a NACK and a stop symbol to the bus to signal the end of the message. Similarly, at the end of a multi-device write operation, the last slave device will signal an ACK and the end of the write sequence.
- the virtual device address may be associated with a predefined sequence of slave devices/registers, such that when the master device reads from or writes to the virtual device address, it is understood as invoking a series of associated sequential read/write operations with the associated slave devices/registers in a predefined time-multiplexed sequence.
- a single message may include both read and write operations to or from multiple devices mixed together.
- the sequence may have virtual device registers associated with each stage/step of the sequence, i.e. a respective virtual device register may be mapped or aliased to the slave device register to be read from or written to in each step of the sequence.
- the master device may read from or write to a portion of the sequence by specifying a virtual device register that corresponds to an intermediate step/stage of the sequence. The multi-device read/write operation would then continue from that step/stage through the remainder of the sequence.
- the I 2 C read/write bit may be ignored, and the read or write operation may be determined by proper initialization of the slave devices thereby enabling the combination of read and write operations in a single message.
- more than one predefined sequence may be predefined for the devices on the bus.
- the two or more sequences may involve different slave devices, the same slave devices in different orders, different slave device registers, the same slave device registers in different orders, or any overlapping combination thereof.
- Each sequence has an associated virtual device address, such that the master device may select and initiate a read/write operation for a particular sequence by using that sequence's associated virtual device address.
- Implementation of the sequential read/write operations for a sequence includes providing each slave device in the subset of slave devices included in the sequence with the corresponding virtual device address.
- Each slave device also stores data or information that indicates the timeslot or order in which the slave device is to respond to the read/write operation. For example, in one embodiment each slave device may be assigned an ordinal indicating in which timeslot it is to respond, and the slave devices then each count the number of timeslots in a communication addressed to the virtual device address to determine in which timeslot they are to respond.
- FIG. 8 shows, in flowchart form, an example method 400 for communications between a master device and a plurality of slave devices on a communications bus with a common data line.
- the method involves specifying a virtual device address that corresponds to a predefined sequence of slave devices and/or slave device registers.
- an associated virtual device address V is stored in the subset of slave devices to be involved in the sequence.
- the sequence may, in some instances, include specified virtual device registers that correlate to individual slave device registers as a mechanism for specifying a starting point in the sequence other than the first device/register of the sequence.
- Data is also stored at each slave device in the subset that indicate the order or timeslot in which the slave device is to respond.
- the order data further indicates a specific slave device register local to that specific slave device that is to be read from or written to in that timeslot.
- the master device initiates a communication on the bus with a start symbol followed by the virtual device address V.
- the master device then indicates read or write, and receives an ACK from the slave devices that correspond to the virtual device address.
- the master device may then also indicate a first virtual register address to specify a starting point in the sequence other than the first register/device.
- the virtual device address may be associated with a sequential read/write operation involving two or more sequences, and the virtual device register specified in the communication may indicate which of the sequences is being invoked by the master device. That is, each sequence may be associated with a virtual device register address, and the virtual device address only signals that a sequential read/write operation is to be performed.
- the first value transmitted in the sequence following the virtual slave device address will indicate what sequence of registers are to be read, thereby enabling multiple sequences to be initiated, thereby enabling a single virtual device address to initiate several sequences.
- the master device may send a repeated start symbol followed by the virtual device address if the master device is performing a read operation in the case where a virtual device register address has been specified. If no virtual device register address is being specified, the master device may initiate the read operation without necessarily requiring the sending of a repeated start symbol.
- Operation 410 the master device performs the multi-device read or write operation.
- Operation 410 first includes conducting the read/write with respect to the first slave device/register in the selected sequence (or with respect to the slave device/register corresponding to the stage of the sequence associated with virtual register address referenced in operation 404 in some embodiments). Each read/write operation is then performed in turn in the order predefined by the selected sequence in the respective timeslots in the communication.
- the slave devices involved in the sequence monitor the communication on the bus to identify when it is their turn to respond. This may, in some embodiments, include maintaining a count of timeslots and comparing the count to the stored data indicating the timeslot(s) assigned to that slave device/register.
- the master device While conducting the sequential read or write in operation 410 , the master device determines whether the multi-device read/write operation is completed (which may or may not correspond to the end of the sequence, for example if the master device does not intend to read/write the full sequence). If the multi-device read/write operation is completed, then the master device outputs a stop symbol to the bus to end the message.
- the presented methods are backwards compatible with the existing I 2 C protocol, yet allow for an expansion in the way devices and registers are addressed. This enables an increase in the transfer efficiency for many use cases.
- the backwards compatibility ensures existing devices can be attached to the same bus as enhanced devices and existing test equipment such as bus protocol analysers can be used without requiring any updates to test, debug and verify operation of the extended operation of the bus.
- quantity of information written to or read from the slave devices may be a single bit.
- a data package with a word length as short as a single bit may be used to control relays, actuators or to read a control value from a switch.
- the single bit may be utilized as a virtual “wire”, thereby connecting multiple entities using two wires to convey a multitude of information. As an example, multiple wires are often used for control. This increases the number of wires and physical size of the system and puts requirements on the available number of I/O pins needed to connect two or more devices.
- the value can be seen as a sample from a virtual wire between two or more devices thereby simplifying the programming and physical layout of such a system.
- the cost of such a system will be significantly lower due to the smaller size of the board and lower number of terminals required.
- the received messages are stored in a buffer, all the values can be updated simultaneously, e.g. at the end of a message.
- the sampled values are stored in a buffer, it is possible to sample several values simultaneously and avoid any skew between the sample events. Notice, that wired-OR, NRZI and similar signalling schemes do not preclude multiple devices signalling at the same time.
- the single bit carrying information can truly represent signalling from multiple devices at the same time thereby solving any problems associated with multiple drivers.
- the virtual wire works as true tunnelling of information.
- multiple devices are often merged on a common interrupt signalling line. This line may then be removed and be part of the new signalling scheme thereby saving cost and space.
- FIG. 9 shows an example structure 500 of a message based on virtual wires, as described above.
- FIG. 10 shows, in flowchart form, an example process 550 for communications between a master device and a plurality of slave devices on a communications bus with a common data line using a virtual wire protocol, as described above.
- the example process 550 features a loop 560 of read/write operations in which each virtual wire is mapped to a respective register location in a respective slave device.
- the processes and systems according to the present application may be implemented in a number of computing devices, including, without limitation, servers, suitably-programmed general purpose computers, and mobile devices.
- the processes may be implemented by way of software containing instructions for configuring a processor or processors to carry out the functions described herein.
- the software instructions may be stored on any suitable non-transitory computer-readable memory, including CDs, RAM, ROM, Flash memory, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Systems (AREA)
- Small-Scale Networks (AREA)
Abstract
Description
Slave Device | Slave Register Address | Virtual Register Address |
S1 | 00101000 | 00000110 |
S2 | 00100010 | 00000111 |
S2 | 00010001 | 00001000 |
S3 | 01000101 | 00001001 |
S4 | 01110010 | 00001010 |
S5 | 00000100 | 00001011 |
Claims (29)
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US14/691,707 US9798684B2 (en) | 2015-04-21 | 2015-04-21 | Bus communications with multi-device messaging |
EP16163663.4A EP3086236B1 (en) | 2015-04-21 | 2016-04-04 | Bus communications with multi-device messaging |
CN201610247791.7A CN106066834B (en) | 2015-04-21 | 2016-04-20 | Bus communication with multi-device message transfer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US14/691,707 US9798684B2 (en) | 2015-04-21 | 2015-04-21 | Bus communications with multi-device messaging |
Publications (2)
Publication Number | Publication Date |
---|---|
US20160314087A1 US20160314087A1 (en) | 2016-10-27 |
US9798684B2 true US9798684B2 (en) | 2017-10-24 |
Family
ID=55661301
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/691,707 Active 2035-12-01 US9798684B2 (en) | 2015-04-21 | 2015-04-21 | Bus communications with multi-device messaging |
Country Status (3)
Country | Link |
---|---|
US (1) | US9798684B2 (en) |
EP (1) | EP3086236B1 (en) |
CN (1) | CN106066834B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170371830A1 (en) * | 2016-06-28 | 2017-12-28 | Qualcomm Incorporated | Accelerated i3c master stop |
US10198331B2 (en) * | 2017-03-31 | 2019-02-05 | Stmicroelectronics International N.V. | Generic bit error rate analyzer for use with serial data links |
US10783101B1 (en) * | 2019-06-26 | 2020-09-22 | Semiconductor Components Industries, Llc | Methods and system for communication between a host device and slave devices |
US11294837B2 (en) | 2018-08-22 | 2022-04-05 | Google Llc | Dynamic delay calibration of devices attached to bus systems utilizing time-multiplexed clock and data lines |
US11947479B2 (en) | 2018-08-22 | 2024-04-02 | Google Llc | Dynamic timing calibration systems and methods |
Families Citing this family (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102015214133A1 (en) * | 2015-07-27 | 2017-02-02 | Continental Automotive Gmbh | Integrated circuit for operating on a bus and method for operating the integrated circuit |
US10372663B2 (en) | 2017-07-25 | 2019-08-06 | Qualcomm Incorporated | Short address mode for communicating waveform |
CN107861893B (en) * | 2017-10-16 | 2019-05-03 | 广东高云半导体科技股份有限公司 | I3C is verified from equipment, the authentication system and method for master-slave equipment |
CN108170617B (en) * | 2017-12-01 | 2019-12-13 | 广东高云半导体科技股份有限公司 | I3C equipment and communication method |
CN108255754B (en) * | 2017-12-01 | 2019-11-19 | 广东高云半导体科技股份有限公司 | A kind of I3C main equipment of compatible I2C, I3C master-slave equipment communication system and method |
CN108255768A (en) * | 2017-12-01 | 2018-07-06 | 广东高云半导体科技股份有限公司 | A kind of link bridge circuit, communication system and method based on I3C |
US10805262B1 (en) * | 2019-06-10 | 2020-10-13 | Banner Engineering Corp. | Modbus system having actual and virtual slave addresses and slave sensors |
CN111209229B (en) * | 2019-12-30 | 2021-12-21 | 苏州艾利特机器人有限公司 | Fieldbus method based on virtual equipment |
CN111131291B (en) * | 2019-12-30 | 2023-05-26 | 广东中鹏热能科技有限公司 | Protocol implementation method using upper computer software as lower computer equipment |
US11177856B2 (en) * | 2020-02-03 | 2021-11-16 | Qualcomm Incorporated | Crosstalk amelioration systems and methods in a radio frequency front end (RFFE) communication system |
CN112416841A (en) * | 2020-11-10 | 2021-02-26 | 光华临港工程应用技术研发(上海)有限公司 | Multi-machine communication realization method based on I2C bus and multi-machine communication system |
CN113992470B (en) * | 2021-10-14 | 2023-06-16 | 上海艾为电子技术股份有限公司 | Data transmitting method, data receiving method, master device, slave device and electronic device |
WO2024038038A1 (en) * | 2022-08-16 | 2024-02-22 | Trinamix Gmbh | I2c register map with virtual extension |
WO2024073431A1 (en) * | 2022-09-27 | 2024-04-04 | Banner Engineering Corp. | Reconfigurable detection windows with dynamically activated detection arrays |
CN116226021B (en) * | 2023-05-06 | 2023-07-25 | 摩尔线程智能科技(北京)有限责任公司 | Data receiving and transmitting method and device and graphics processor |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030149824A1 (en) | 2002-02-06 | 2003-08-07 | Smith Robert B. | Method and apparatus for addressing multiple devices simultaneously over a data bus |
US20030149819A1 (en) | 2002-02-06 | 2003-08-07 | Smith Robert B. | Method and apparatus for ascertaining the status of multiple devices simultaneously over a data bus |
US20050172101A1 (en) * | 1998-05-23 | 2005-08-04 | Aristocrat Technologies Australia Pty Limited | Secured inter-processor and virtual device communications system |
EP1764703A1 (en) | 2005-08-31 | 2007-03-21 | STMicroelectronics Pvl. Ltd. | A system for providing access to multiple data buffers of a data retaining and processing device |
US20130019039A1 (en) * | 2011-06-10 | 2013-01-17 | Intersil Americas LLC | System and method for operating a one-wire protocol slave in a two-wire protocol bus environment |
US20130322461A1 (en) | 2012-06-01 | 2013-12-05 | Research In Motion Limited | Multiformat digital audio interface |
US20130322462A1 (en) | 2012-06-01 | 2013-12-05 | Research In Motion Limited | Universal synchronization engine based on probabilistic methods for guarantee of lock in multiformat audio systems |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1255377A1 (en) * | 2001-05-02 | 2002-11-06 | Deutsche Thomson-Brandt Gmbh | Interface circuit |
US7747933B2 (en) * | 2005-07-21 | 2010-06-29 | Micron Technology, Inc. | Method and apparatus for detecting communication errors on a bus |
CN100498747C (en) * | 2006-12-22 | 2009-06-10 | 普天信息技术研究院 | Data processing master control equipment, secondary equipment, system and method |
CN101399654B (en) * | 2007-09-25 | 2011-08-03 | 华为技术有限公司 | Serial communication method and apparatus |
CN101799795B (en) * | 2009-12-30 | 2011-11-02 | 龙芯中科技术有限公司 | 1553B bus monitor and bus system with same |
CN102541805A (en) * | 2010-12-09 | 2012-07-04 | 沈阳高精数控技术有限公司 | Multi-processor communication method based on shared memory and realizing device thereof |
CN102243619A (en) * | 2011-06-23 | 2011-11-16 | 天津光电通信技术有限公司 | FPGA (Field Programmable Gate Array)-based method for realizing multi-path I2C (Inter-Integrated Circuit) bus port expansion |
CN102662892B (en) * | 2012-03-02 | 2014-12-31 | 北京航空航天大学 | FlexRay communication controller |
CN102801744B (en) * | 2012-09-05 | 2015-11-25 | 上海斐讯数据通信技术有限公司 | A kind of communication means and system |
-
2015
- 2015-04-21 US US14/691,707 patent/US9798684B2/en active Active
-
2016
- 2016-04-04 EP EP16163663.4A patent/EP3086236B1/en active Active
- 2016-04-20 CN CN201610247791.7A patent/CN106066834B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050172101A1 (en) * | 1998-05-23 | 2005-08-04 | Aristocrat Technologies Australia Pty Limited | Secured inter-processor and virtual device communications system |
US20030149824A1 (en) | 2002-02-06 | 2003-08-07 | Smith Robert B. | Method and apparatus for addressing multiple devices simultaneously over a data bus |
US20030149819A1 (en) | 2002-02-06 | 2003-08-07 | Smith Robert B. | Method and apparatus for ascertaining the status of multiple devices simultaneously over a data bus |
EP1764703A1 (en) | 2005-08-31 | 2007-03-21 | STMicroelectronics Pvl. Ltd. | A system for providing access to multiple data buffers of a data retaining and processing device |
US20130019039A1 (en) * | 2011-06-10 | 2013-01-17 | Intersil Americas LLC | System and method for operating a one-wire protocol slave in a two-wire protocol bus environment |
US20130322461A1 (en) | 2012-06-01 | 2013-12-05 | Research In Motion Limited | Multiformat digital audio interface |
US20130322462A1 (en) | 2012-06-01 | 2013-12-05 | Research In Motion Limited | Universal synchronization engine based on probabilistic methods for guarantee of lock in multiformat audio systems |
Non-Patent Citations (5)
Title |
---|
Bossart, et al., Audio Engineering Society, Convention e-Brief, Presented at the 137th Convention, Oct. 9-12, 2014. |
EPO, Extended European Search Report relating to EP Application No. 16163663.4, dated Sep. 22, 2016. |
NXP Semiconductors, UM10204, I C-bus specification and user manual, Rev.6-Apr. 4, 2014. |
NXP Semiconductors, UM10204, I C-bus specification and user manual, Rev.6—Apr. 4, 2014. |
TPA6166A2 3.5mm Jack Detect and Headset Interface IC, Revised Jan. 2015. |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170371830A1 (en) * | 2016-06-28 | 2017-12-28 | Qualcomm Incorporated | Accelerated i3c master stop |
US10198331B2 (en) * | 2017-03-31 | 2019-02-05 | Stmicroelectronics International N.V. | Generic bit error rate analyzer for use with serial data links |
US11294837B2 (en) | 2018-08-22 | 2022-04-05 | Google Llc | Dynamic delay calibration of devices attached to bus systems utilizing time-multiplexed clock and data lines |
US11947479B2 (en) | 2018-08-22 | 2024-04-02 | Google Llc | Dynamic timing calibration systems and methods |
US10783101B1 (en) * | 2019-06-26 | 2020-09-22 | Semiconductor Components Industries, Llc | Methods and system for communication between a host device and slave devices |
Also Published As
Publication number | Publication date |
---|---|
US20160314087A1 (en) | 2016-10-27 |
CN106066834A (en) | 2016-11-02 |
CN106066834B (en) | 2020-04-28 |
EP3086236A1 (en) | 2016-10-26 |
EP3086236B1 (en) | 2022-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9798684B2 (en) | Bus communications with multi-device messaging | |
CN106681953B (en) | Slave connected with host by using I2C bus and communication method thereof | |
US10108578B2 (en) | Single wire communications interface and protocol | |
EP2793138B1 (en) | Method and system for single-line inter-integrated circuit (i2c) bus | |
EP3537307A1 (en) | Method for handling i2c bus deadlock, electronic device, and communication system | |
US20080270654A1 (en) | Bus System for Selectively Controlling a Plurality of Identical Slave Circuits Connected to the Bus and Method Therefore | |
CN104699576B (en) | Serial communication testing device, system comprising same and method thereof | |
CN109359073B (en) | Inter-device communication method and device based on SPI bus | |
JP2005025767A (en) | Method and data structure for random access via bus connection | |
US11106618B2 (en) | Method for addressing an integrated circuit on a bus and corresponding device | |
US10747360B2 (en) | Display device and driver thereof | |
CN103488600A (en) | Universal auxiliary machine synchronous serial interface circuit | |
CN113722261A (en) | Method for expanding chip selection number and enhancing flexibility of read-write response time by SPI | |
US20130262610A1 (en) | Communication system and method for configuring programmable hardware | |
CN113961496A (en) | Communication circuit system, method, chip and storage medium | |
US20230032989A1 (en) | Serial data communication with in-frame response | |
EP1814037A1 (en) | Semiconductor storage device | |
EP3392778A1 (en) | Communication device, communication method, program, and communication system | |
JP2014232414A (en) | I2C communication slave device | |
CN210270888U (en) | Single-bus communication circuit | |
KR102682606B1 (en) | Display device and driver therof | |
CN113672536B (en) | Data storage system, storage module and data storage method | |
US11327908B2 (en) | Method and system for facilitating communication between interconnect and system memory on system-on-chip | |
TWI829474B (en) | Slave device and addressing method for communication system | |
EP1498823B1 (en) | Method and data structure for random acces via a bus connection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: BLACKBERRY LIMITED, CANADA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:POULSEN, JENS KRISTIAN;REEL/FRAME:035456/0073 Effective date: 20150420 |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
MAFP | Maintenance fee payment |
Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY Year of fee payment: 4 |
|
AS | Assignment |
Owner name: OT PATENT ESCROW, LLC, ILLINOIS Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:BLACKBERRY LIMITED;REEL/FRAME:063471/0474 Effective date: 20230320 |
|
AS | Assignment |
Owner name: MALIKIE INNOVATIONS LIMITED, IRELAND Free format text: NUNC PRO TUNC ASSIGNMENT;ASSIGNOR:OT PATENT ESCROW, LLC;REEL/FRAME:064015/0001 Effective date: 20230511 |
|
AS | Assignment |
Owner name: MALIKIE INNOVATIONS LIMITED, IRELAND Free format text: NUNC PRO TUNC ASSIGNMENT;ASSIGNOR:BLACKBERRY LIMITED;REEL/FRAME:064066/0001 Effective date: 20230511 |
|
AS | Assignment |
Owner name: MALIKIE INNOVATIONS LIMITED, IRELAND Free format text: CORRECTIVE ASSIGNMENT TO CORRECT 12817157 APPLICATION NUMBER PREVIOUSLY RECORDED AT REEL: 064015 FRAME: 0001. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT;ASSIGNOR:OT PATENT ESCROW, LLC;REEL/FRAME:064807/0001 Effective date: 20230511 Owner name: MALIKIE INNOVATIONS LIMITED, IRELAND Free format text: CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION NUMBER PREVIOUSLY RECORDED AT REEL: 064015 FRAME: 0001. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT;ASSIGNOR:OT PATENT ESCROW, LLC;REEL/FRAME:064807/0001 Effective date: 20230511 Owner name: OT PATENT ESCROW, LLC, ILLINOIS Free format text: CORRECTIVE ASSIGNMENT TO CORRECT THE COVER SHEET AT PAGE 50 TO REMOVE 12817157 PREVIOUSLY RECORDED ON REEL 063471 FRAME 0474. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT;ASSIGNOR:BLACKBERRY LIMITED;REEL/FRAME:064806/0669 Effective date: 20230320 |