Serial Communication Protocol

By using sub-byte syllables and slave device identification to determine position in SPI communications, the problem of increased latency in daisy-chain configurations is solved, improving system efficiency and hardware efficiency.

CN111010881BActive Publication Date: 2024-08-23RENESAS DESIGN (UK) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201880010262.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-08-06
Publication Date
2024-08-23
Estimated Expiration
2038-08-06

AI Technical Summary

Technical Problem

In the communication between multiple SPI slave devices, it is difficult for the existing technology to effectively manage the increased delay caused by the daisy chain configuration, which reduces the system efficiency.

Method used

In a serial communication device, the master device sends a communication frame that includes sub-byte syllables, triggers the data transfer from the input to the slave output, and stores its identification in the slave device to determine the location, ensuring that the data is in the same clock cycle Transmission that reduces or eliminates the delay between slave input and slave output.

Benefits of technology

Significantly reduces the time required for data to propagate across the daisy chain, improving system efficiency and simplifying hardware layout and complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111010881B
    Figure CN111010881B
Patent Text Reader

Abstract

The present invention provides a serial communication protocol for daisy-chained slave devices that eliminates the need for a dummy clock to cycle an entire byte between the input and output of the slave device, instead requiring a set of shorter dummy clock cycles, thereby improving the efficiency of the serial communication system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a serial communication protocol, and to a method and apparatus for implementing the protocol. Background Art

[0002] An example of a serial communication protocol is the protocol implemented by the Serial Peripheral Interface (SPI), which is a common communication interface used in embedded systems and various other scenarios.

[0003] Although SPI is not formally standardized, Figure 1 shows the characteristics of the SPI interface. A master device 100 communicates with one or more slave devices 102, and the devices exchange different types of logic signals. The first logic signal SCK 104 is the clock output by the master device and is used to coordinate the timing of events in the operation of the SPI protocol.

[0004] The second logic signal 106 is a slave input signal that inputs data to the slave device, which comes from the master device 100 or from another slave device in a daisy-chain configuration. This signal is generally referred to as a master output slave input (MOSI) signal. The third logic signal MISO 108 is a slave output signal and is used for data output of the slave device to be provided as an input for the master device 100 or another slave device in a daisy-chain configuration. This signal is generally referred to as a master input slave output (MISO) signal. The fourth logic signal 110 is a slave select signal output from the master device 100. The slave select signal is generally active low and is used to selectively enable communication between the slave device 102 and the master device 100.

[0005] Because SPI is not a formal standard, the specific labeling of the logic signals 104 to 110 may vary between different implementations. For example, the slave select signal 110 may also be referred to as SS and the clock is often referred to as CLK or SCLK.

[0006] The SPI bus may operate with a single master device and one or more slave devices. If a single slave device is used as shown in the example of FIG. 1 , the slave select signal 110 may be fixed at a logic low.

[0007] Multiple SPI devices are not individually addressable. If communication between multiple devices is required, then modifications are required. FIG. 2 shows an arrangement of parallel slave connections, where the master microcontroller 200 is provided with multiple slave select outputs, one for each slave device 102 and numbered CSB1, CSB2 to CSBn ​​in this diagram for slave devices 102a, 102b to 102N, where N is the total number of slave devices in the system.

[0008] Each slave device 102 is driven by the same clock SCK, and the microcontroller 200 distributes an independent slave select signal to each slave device 102 so that the slave devices can be individually addressed. Each of the slave devices 102 has the same address, and a single slave output line 208 is used to command all slave devices. Because all slave devices share the same clock and data lines, only the slave device whose low-state active slave select input is asserted low will acknowledge and respond to activity on the clock and data lines.

[0009] This system becomes difficult to implement when the number of slave devices becomes large. An alternative solution that can reduce hardware and layout complexity is to connect the slave devices together in a daisy chain, which means that the data inputs and outputs of the slave devices are connected in series with each other. An example of this connection is shown in Figure 3.

[0010] Here, all slave devices 302 share the same clock 104 and slave select signal 110. However, in this configuration, only the first slave device 302a receives data directly from the microcontroller 300. The remaining slave devices, namely slave devices 302b to 302N (where N is the total number of slave devices), each receive their data from the slave output logic signal of the preceding slave device 302 in the chain. In effect, the slave devices 302 act as a single large shift register. The data output by the master device 300 is input to the first slave device 302a and then sent to each successive slave device 302b to 302n. It is possible to provide only two slave devices in a daisy chain configuration.

[0011] The device address of each slave device 302 is automatically set by the slave's position in the chain. The first device has device address DevAddr = 0x01, the second device in the daisy chain has device address DevAddr = 0x02, etc. Device addresses 0x00 and 0x3f are used for special broadcast write commands as described below.

[0012] According to this protocol, a certain number of bytes need to be written during a write or read operation depending on the number of devices in the daisy chain. This means that approximately M*N dummy clock cycles are required, where M is the number of bits in a byte and N is the number of slave devices in the daisy chain configuration.

[0013] As described above, connecting slave devices in a daisy-chain format provides improved layout and hardware efficiency compared to connecting slave devices in parallel. However, when the number of daisy-chained devices begins to grow large, the number of dummy clock cycles required causes an increased delay in the time it takes to fill the registers of each slave device.

[0014] This added delay reduces the efficiency of the system. Summary of the invention

[0015] According to a first aspect of the present disclosure, there is provided a serial communication device comprising: a master device having a master input and a master output; a plurality of slave devices, each of which comprises a slave input and a slave output, the plurality of slave devices being arranged in a daisy chain configuration, wherein a first slave device is arranged to receive data from the master output at its slave input, and one or more consecutive slave devices are arranged to receive data from the slave output of a preceding slave device; wherein the master device is arranged to send a communication frame comprising a sub-byte syllable, the sub-byte syllable selectively triggering data transmission from the slave input to the slave output.

[0016] Optionally, the communication frame includes a device address byte defining a slave device address, and the sub-byte syllable is provided as an initial part of the address byte.

[0017] Optionally, said triggered data transfer from slave input to slave output commences before a remainder of said device address byte is received by said slave input.

[0018] Optionally, the sub-byte syllable comprises one bit.

[0019] Optionally, a single bit remains at the first logic value to indicate the start of a communication frame.

[0020] Optionally, eventually the slave adjusts delays to ensure that the input to the master is byte aligned.

[0021] Optionally, said adjustment of said delay is set by a dedicated command embedded in said communication frame, preferably in said address byte.

[0022] Optionally, said adjustment of said delay is set by a register in said slave device, said register having a value which can be set to tell a slave device to perform byte alignment.

[0023] Optionally, the serial communication device is configured such that each slave device stores its identification to determine its position in the slave chain and transfers data from slave input to slave output in the same clock cycle during transmission of a communication frame.

[0024] Optionally, the serial communication device is configured such that: during transmission of an initial communication frame, each slave device is configured to determine its position in the chain based on a delay between the slave input and the slave output for the slave device; and thereafter during transmission of subsequent communication frames, the slave device transmits data from its slave input to its slave output in the same clock cycle.

[0025] Optionally, the serial communication device comprises a serial peripheral interface.

[0026] According to a second aspect of the present disclosure, there is provided a serial communication device comprising: a master device having a master input and a master output; a plurality of slave devices, each of which comprises a slave input and a slave output, the plurality of slave devices being arranged in a daisy chain configuration, wherein a first slave device is arranged to receive data from the master output at its slave input, and one or more consecutive slave devices are arranged to receive data from the slave output of a preceding slave device; wherein each slave device stores its identification to determine its position in the slave device chain, and during transmission of a communication frame, transmits data from the slave input to the slave output in the same clock cycle.

[0027] Optionally, the serial communication device is configured such that: during transmission of an initial communication frame, each slave device is configured to determine its position in the chain based on a delay between the slave input and the slave output for the slave device; and thereafter during transmission of subsequent communication frames, the slave device transmits data from its slave input to its slave output in the same clock cycle.

[0028] Optionally, the delay between the slave input and slave output is k bytes, where k is the position of the slave device in the chain.

[0029] Optionally, the delay between the slave input and slave output is k sub-byte syllables, where k is the position of the slave device in the chain.

[0030] It should be understood that the features of the second aspect can be combined with the features of the first aspect, that is, the "zero delay" concept included in the second aspect can use the "bit alignment" concept of the first aspect to enumerate the slave device address in those specific embodiments where an initialization step is required; thus, all the features of the first aspect can be included as constituent components of the second aspect. Likewise, the "zero delay" concept included in the second aspect can use the byte alignment method known for enumerating the slave device address as needed.

[0031] The present disclosure also includes methods implemented by the first and second aspects. According to the third aspect of the present disclosure, there is provided a method for transmitting data between devices in a serial communication device, the serial communication device comprising a master device, a plurality of slave devices, the master device having a master input and a master output, the plurality of slave devices each comprising a slave input and a slave output, the plurality of slave devices being arranged in a daisy chain configuration, wherein the first slave device is arranged to receive data from the master output at its slave input, and one or more consecutive slave devices are arranged to receive data from the slave output of the preceding slave device; wherein, according to the method: the master device sends a communication frame comprising a sub-byte syllable, the slave device receives the communication frame at its slave input, and then outputs data at its slave output immediately after receiving the sub-byte syllable.

[0032] Optionally, the communication frame includes a device address byte defining a slave device address, and the sub-byte syllable is provided as an initial part of the address byte.

[0033] Optionally, the triggered data transfer from the slave input to the slave output begins before the remainder of the device address byte is received by the slave input.

[0034] Optionally, the sub-byte syllable comprises one bit.

[0035] Optionally, a single bit remains at the first logic value to indicate the start of a communication frame.

[0036] Optionally, eventually the slave adjusts delays to ensure that the input to the master is byte aligned.

[0037] Optionally, said adjustment of said delay is set by a dedicated command embedded in said communication frame, preferably in said address byte.

[0038] Optionally, said adjustment of said delay is set by a register in said slave device, said register having a value which can be set to tell a slave device to perform byte alignment.

[0039] Optionally, each slave device stores its identification to determine its position in the chain of slave devices, and during transmission of a communication frame, transfers data from slave input to slave output in the same clock cycle.

[0040] Optionally, during transmission of an initial communication frame, each slave device determines its position in the chain based on a delay between the slave input and slave output for the slave device; and thereafter, during transmission of subsequent communication frames, the slave device transfers data from its slave input to its slave output in the same clock cycle.

[0041] Optionally, the method is part of a serial peripheral interface protocol.

[0042] According to a fourth aspect of the present disclosure, there is provided a method for transmitting data between devices in a serial communication device, the serial communication device comprising a master device, a plurality of slave devices, the master device having a master input and a master output, the plurality of slave devices each comprising a slave input and a slave output, the plurality of slave devices being arranged in a daisy chain configuration, wherein a first slave device is arranged to receive data from the master output at its slave input, and one or more consecutive slave devices are arranged to receive data from the slave output of a preceding slave device; wherein, according to the method, each slave device stores its identification to determine its position in the slave device chain, and during transmission of a communication frame, data is transmitted from the slave input to the slave output in the same clock cycle.

[0043] Optionally, during transmission of an initial communication frame, each slave device determines its position in the chain based on a delay between the slave input and slave output for the slave device; and thereafter, during transmission of subsequent communication frames, the slave device transfers data from its slave input to its slave output in the same clock cycle.

[0044] Optionally, the delay between the slave input and slave output is k bytes, where k is the position of the slave device in the chain.

[0045] Optionally, the delay between the slave input and slave output is k sub-byte syllables, where k is the position of the slave device in the chain.

[0046] According to a further aspect, the present disclosure may also provide a microcontroller, which is configured to form part of the device of the first or second aspect and to execute part of the method of the third and fourth aspects; and / or a slave device, which is configured to form part of the device of the first or second aspect and to execute part of the method of the third and fourth aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The present disclosure will now be described, by way of example only, with reference to the accompanying drawings, in which:

[0048] FIG1 shows the known general principle of a serial peripheral interface system;

[0049] FIG. 2 shows a conventional parallel connection of multiple slave devices in an SPI system;

[0050] FIG3 shows a conventional daisy-chain connection of slave devices in an SPI system;

[0051] FIG4 illustrates an example of writing a single data entry to a single device according to the known SPI communication protocol;

[0052] FIG5 shows an example of reading a single data entry from a single device according to the same known SPI serial connection protocol;

[0053] Figure 6 The structure of a microcontroller suitable for executing the present disclosure is shown.

[0054] Figure 7 An example of writing a single data entry into a single device according to the SPI protocol of the present disclosure is shown;

[0055] Figure 8 Show according to Figure 7 The protocol shown in the example reads a single data from a single device;

[0056] Fig. 9 shows the optional byte alignment that can be provided for microcontrollers where required; and

[0057] Fig.10 An example of the operation of a "zero delay" embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0058] The present disclosure provides an improved SPI daisy chain compared to existing protocols.

[0059] The operation of the existing protocol is shown with respect to FIGS. 4 and 5 , which may be used with a system of daisy-chained slave devices as shown in FIG. 3 .

[0060] The slave select signal CSB 110 is shared between all slave devices 302. When the slave select signal is driven low, the slave device is enabled and ready to read and write data. There is a one byte delay between the slave input signal (MOSI, 106) and the slave output signal (MISO, 108), which is manifested as a byte's worth of dummy clock cycles at the initial data output from the slave output signal (MISO, 108). The device address of each slave device is enumerated by counting the number of null bytes received at the slave input signal (MOSI, 106) after enabling the slave select signal (or, as an equivalent scheme, by the number of null bytes output from the output signal (MISO, 108)). If its enumerated address matches the address specified by the address field forming part of the communication frame, then the slave device acts on the data, as described below.

[0061] Once the slave select signal is able to start data communication between the master and slave devices, the time delay it takes for a command to propagate from the master device to any particular slave device of the daisy-chained device is m*k number of clock cycles, where m is the number of bytes in bits and k is the kth position of the slave device on the chain. The final slave device in the chain requires a delay of m*N clock cycles before it receives the command, and for large chains, this delay can lead to significant inefficiencies.

[0062] According to the specification of the serial communication protocol of the present disclosure, data is exchanged between a master device and a slave device in a communication frame. Each communication frame has a command portion and a data portion, and each corresponding portion may include a packet of one or more bytes.

[0063] A byte is a unit of information comprising a number of bits, which may have a value of one or zero. The most common byte size is eight bits, but it should be appreciated that any number of bits may be provided as a byte and the present disclosure is not limited to any particular byte size.

[0064] The command portion of the communication frame includes information about the size of the communication frame, including the number of data bytes included.

[0065] The command portion includes the device address, an optional quantity field, and a register address. The data portion includes one or more data bytes.

[0066] The device address comprises one byte and includes as its most significant bit the value B meaning broadcast, which is set to B=1 to tell the system to broadcast the message to all devices, or to B=0 to tell the system to send a normal message to a single device.

[0067] The next most significant bit of the device address is a value S, which indicates whether the communication frame is for data transfer of only one byte (S=1) or for a block of data (S=0).The remaining six bits of the device address byte, DevAddr[5:0], specify the slave address.

[0068] As described above, the device address of each slave device 302 is automatically set by the slave's position in the chain. The first device has a device address DevAddr = 0x01, the second device in the daisy chain has a device address DevAddr = 0x02, and so on.

[0069] The first reserved device address, here 0x00, is reserved to indicate that the same data should be written to the same register in all devices (Broadcast Bit B is set to 1).

[0070] The second reserved device address is here 0x3F to indicate that different data should be written to the same register of all devices (broadcast bit B is set to 1).

[0071] The remaining values, here 0x01 to 0x3E, are used as device addresses from device 1 to 62.

[0072] The command portion includes an optional quantity field, which is used only in the case of a data block being transmitted (detected by the setting of S=0 in the device address byte as described above). In that case, the quantity field specifies the number of data bytes in the communication frame. It has a value from 0x00 to 0xFF.

[0073] The command portion includes a register address, which defines the register address of the slave device to which a read or write operation is to be performed. The most significant bit is marked RW, meaning read / write, and is set to RW=0 to indicate a write operation to the register address, or to RW=1 to indicate a read operation from the register address.

[0074] Next, the remaining bits of the register address byte, RegAddr[6:0], define the address and have values ​​from 0x00 to 0x7F.

[0075] A communication frame then includes one or more data bytes, which provide a data payload and have values ​​0x00 to 0xFF.

[0076] 4 shows an example of writing a single data word to a single device according to this protocol. The diagram shows the traces of slave select signal xCSB 110, clock SCK 104 together with slave input MOSI 306 and slave output MISO 308 associated with first slave device 302.

[0077] At time 402, device address enumeration begins from select line 110 and remains low until time 404 when master device 300 pulls the signal high to end the data transfer.

[0078] The slave input 306 receives a communication frame from the master device including device address bytes DA7:DA0, register address bytes RA7:RA0, and data payload D7:D0.

[0079] After a one byte delay, the communication frame is transmitted to the slave output 308 .

[0080] Thus, each successive slave in the daisy chain must wait for another byte of delay before receiving the expected data. Thus, if there are N slaves in a daisy chain, this method requires a delay of m*N dummy clock cycles before the entire chain can be filled, where m is the number of bits in a byte. An additional N-1 bytes of 0x00 must be cycled through.

[0081] Figure 5 shows an example of reading a single data word into a single device according to the same protocol. It can be seen here that if there are N slave devices in the daisy chain, there is a delay of m*N dummy clock cycles before the entire chain can be filled, where m is the number of bits in a byte. An additional N+1 bytes of 0x00 must be cycled through.

[0082] This protocol is byte-aligned and easy to implement with one microprocessor as the master and multiple other devices as slaves. However, as the number of slaves increases, the amount of information in each device increases, and this byte-aligned protocol encounters some difficulties when faced with large data transfers, and the delays involved in propagating data to the slaves can reduce efficiency to unacceptable levels.

[0083] The present disclosure provides a new serial communication protocol that provides improvements over the above-described protocols and over the general art. It will be described herein with particular reference to SPI, but it will be appreciated that the concepts described herein may have broader application.

[0084] Serial communications according to the present disclosure improve transmission efficiency by eliminating the requirement for a one-byte delay between slave input and slave output. The delay between slave input and slave output can be selected to be a sub-byte syllable (e.g., a bit or a nibble); or in the case of a storage slave device, the delay can be completely eliminated (which means that during the transmission of the communication frame, the data is transferred from the slave input to the slave output in the same clock cycle). During the initial enumeration step that may involve a byte delay or a sub-byte syllable delay between the slave input and output, the slave device can be stored in a suitable slave device memory. The reduction of the delay between the slave input and the slave output according to any one or a combination of these aspects can significantly reduce the amount of time it takes for a command to propagate from the master device through the daisy chain of slave devices, thereby improving system efficiency.

[0085] An optional feature is to ensure byte alignment of the last slave device looped back to the master microprocessor. This optional feature can be provided in the case where the microprocessor cannot handle instructions that are not byte aligned, but if the microprocessor can handle non-byte alignment, this feature can be ignored.

[0086] According to one aspect of the present disclosure, the delay between the input and the output is set to a sub-byte syllable. "Sub-byte syllable" generally refers to one or more bits that together provide a component of a communication frame. The number of bits is less than the number of bits that form a byte (so, in the example of an octet, a sub-packet syllable may include any one of one to seven bits). In a preferred embodiment, a sub-byte syllable includes one bit but it may also include two bits or other number of bits.

[0087] about Figures 6 to 9 The operation of a serial communication protocol according to a specific embodiment of this aspect is shown.

[0088] Instead of requiring approximately m*N dummy clocks (for m bits per byte in N slaves), according to the new protocol in this regard, only N dummy clocks are needed.

[0089] The protocol may be implemented with a system having a setup similar to that shown in FIG3 . However, a microcontroller according to the present disclosure may be provided with custom software and / or firmware such as an ASIC or FPGA to provide different functionality according to the present disclosure. Figure 6 600 according to the present disclosure is shown in FIG. It should be understood that the present disclosure is not limited to any particular type of microcontroller, the only limitation being that relevant outputs must be provided for use with the systems and methods claimed herein in accordance with the appended claims. The specific microcontroller structure is outside the scope of the present disclosure but is well known to those skilled in the art and need not be described in detail herein.

[0090] In general, a microcontroller 600 according to the present disclosure includes a microprocessor 602 and a memory 604. The microcontroller 600 interfaces with other components via inputs 606 and outputs 608. In a preferred embodiment, the outputs 608 may include the clock 104 and the slave select signal 110 and the MOSI output 306, while the inputs 606 may include the MISO input 308. It should be appreciated that a microcontroller according to the present disclosure may be provided with a plurality of additional outputs and / or inputs, as will be apparent to one skilled in the art.

[0091] According to the present disclosure, a new serial communication protocol may be enabled by the recording of instructions in memory 604 to be executed by microprocessor 602, thus forming a new microcontroller 600 providing the present disclosure with the ability to improve upon existing microcontrollers 300 as known in the art.

[0092] As previously described (ie, as described with reference to Figures 4 and 5), the device address of each slave device is automatically set by the slave device's position in the chain.

[0093] The first reserved device address, here 0x00, is reserved to indicate that the same data should be written to the same register in all devices.

[0094] The second reserved device address is here 0x3F to indicate that different data should be written to the same register of all devices.

[0095] The third reserved device address is 0x3E here to indicate the total number of slave devices in the daisy chain.

[0096] The remaining values, here 0x01 to 0x3D, are used as device addresses from device 1 to 61.

[0097] When the slave select signal is held low (zero), all slave devices are enabled.

[0098] The transmission of address and data via the MISO and MOSI lines is organized in byte packets. Each message may be constructed with one or more of the following data type, device address, number of data, register address, and payload data.

[0099] In a preferred embodiment, the data types may be defined as follows:

[0100] Device address: Addresses a specific slave device and defines protocol information:

[0101]

[0102] Quantity field: defines the number of data bytes in the data frame in case of S=0, or the number of slave devices with command 3E.

[0103]

[0104] Register Address: Defines the slave device register address to be read or written.

[0105]

[0106] Data: Contains the data payload.

[0107] Bit meaning value Data[7:0] data 0x00 to 0xFF

[0108] In the above example, a reserved address (e.g. 0x3E) is used to indicate the total number of slave devices in the daisy chain. It is possible to use various dedicated commands or defined slave registers to tell a slave device that it needs to be byte aligned, i.e., provide appropriate synchronization signals from its slave output to the master input. The slave device can introduce appropriate delays to ensure that this happens.

[0109] A non-limiting example of a slave register implementation is to define a control register "daisy_end_enable" in the slave device (register address is 0x00): a value of 0x00 means it is not the final device, and 0x01 means it is the final device. It can be set to 0x00 by default. If the final device is the third device on the chain that can only write device address = 0x03, register address = 0x00, data = 0x01, then the third device will know that it is the final device on the chain and does not need a special command such as "device ID = 0x3E".

[0110] exist Figure 7 An example of a write operation using this protocol is shown in , which shows the case of writing data to a single device. The operation is similar to the operation described above with respect to FIG. 4 , except that in this case it can be seen that the communication frame is transmitted to the slave output 308 after a delay of one bit instead of one byte.

[0111] Similarly, Figure 8An example of reading a single data from a single device is shown. The operation is similar to that described above with respect to Figure 5, except that in this case the communication frame is transmitted to the slave output 308 after a delay of one bit instead of one byte, as can be seen.

[0112] Thus, it can be seen that the transmission delay is reduced from m clock cycles to only one clock cycle (where there are m clock cycles in one byte, in this case, m=8).

[0113] As an option, if the slave device is identified as the last device in the daisy chain (whose device address is equal to the device number indicated by the 0x3E command), the delay clock can be automatically adjusted from one clock to a different number of clocks, up to the bit length of the byte, so that the zeros preceding the frame start flag (DA7) of the slave output of the last slave device are always equal to m*k to help align the data for the microprocessor if the microprocessor can only process byte information. This is Fig. 9 , which shows selectively increasing the delay for the last slave device.

[0114] According to another aspect of the present disclosure, the delay between the slave input and the slave output in the daisy chain can be completely eliminated, which means that during the transmission of the communication frame, the data is transferred from the slave input to the slave output in the same clock cycle. This is made possible by storing the slave device address at the slave device. The address may be hard-coded in the device, stored at a suitable non-volatile memory; or may be stored in a byte delay protocol as shown in Figures 4 and 5 or according to the first aspect and as shown in Figures 5 and 6. Figures 7 to 9 The device is enumerated in the initial steps of the sub-byte syllable delay shown in FIG.

[0115] A non-limiting example of this concept is discussed here:

[0116] 1. Each slave device can be set with a dedicated register named Device_ID[7:0] (register address 0xFF).

[0117]

[0118] 2. At the beginning, Dev_addr_en defaults to zero, so each slave address delays MOSI to MISO.

[0119] 3. After transferring the first data frame or by a dedicated command, each device obtains its individual device ID by counting the number of zeros or zero bytes, and sets Dev_addr_en high, which means that the device ID of each device has been informed.

[0120] (It will be easier to understand using a dedicated command, you can define 0x3D is calculated for device ID and Dev_addr_en is set high, and 0x3C is cleared for device ID and Dev_addr_en is also cleared), the dedicated command is not necessary but easy to understand.

[0121] 4. After Dev_addr_en is set high, all slave devices will bypass MOSI directly to MISO and then no additional dummy clock is needed.

[0122] 5. One example for reading is as follows after Dev_addr_en is high, and each device has obtained its individual device ID.

[0123] exist Fig.10 This operation is illustrated in . As can be seen here, the slave input signal and the slave output signal are triggered by the same rising clock edge.

[0124] Various improvements and modifications may be made to the above without departing from the scope of the present disclosure.For example, although specific embodiments relate to SPI, it will be appreciated that the present disclosure may be applied to other protocols.

Claims

1. A serial communication device, include: a master device having a master input and a master output; as well as a plurality of slave devices, each of the plurality of slave devices comprising a slave input and a slave output, the plurality of slave devices being arranged in a daisy chain configuration, wherein a first slave device is arranged to receive data from the master output at its slave input, and one or more successive slave devices are arranged to receive data from the slave output of a preceding slave device, wherein the master device being arranged to transmit a communication frame comprising a sub-byte syllable which selectively triggers a data transfer from a slave input to a slave output, the communication frame comprising a device address byte defining a slave device address, and the sub-byte syllable being provided as an initial part of the address byte; as well as The triggered data transfer from the slave input to the slave output begins before the remainder of the device address byte is received by the slave input.

2. The serial communication device of claim 1, wherein the sub-byte syllable comprises one bit.

3. The serial communication device of claim 2, wherein the one bit remains at a first logic value to indicate the start of a communication frame.

4. The serial communication apparatus of claim 1, wherein ultimately the slave device adjusts delays to ensure that input to the master device is byte aligned.

5. The serial communication device of claim 4, wherein the adjustment of the delay is set by a dedicated command embedded in the communication frame.

6. The serial communication device of claim 5, wherein said adjustment of said delay is set by a dedicated command embedded in said address byte.

7. The serial communication device of claim 4, wherein said adjustment of said delay is set by a register in said slave device, said register having a value that can be set to tell a slave device to perform byte alignment.

8. A serial communication device as described in claim 1, which is configured so that each slave device stores its identification to determine its position in the daisy chain of slave devices, and during the transmission of a communication frame, transfers data from the slave input to the slave output in the same clock cycle.

9. The serial communication device as claimed in claim 8, which is configured so that: During transmission of an initial communication frame, each slave device is configured to determine its position in the daisy chain based on a delay between the slave input and the slave output for the slave device; And thereafter during transmission of a subsequent communication frame, the slave device transfers data from its slave input to its slave output in the same clock cycle.

10. The serial communication device of claim 1, comprising a serial peripheral interface.

11. A serial communication device, include: a master device having a master input and a master output; as well as A plurality of slave devices, each comprising a slave input and a slave output, the plurality of slave devices being arranged in a daisy chain configuration, wherein a first slave device is arranged to receive data from the master output at its slave input, and one or more successive slave devices are arranged to receive data from the slave output of a preceding slave device, wherein The serial communication device is configured such that: During transmission of an initial communication frame, each slave device is configured to determine its position in the daisy chain based on a delay between the slave input and the slave output for the slave device; And thereafter during transmission of a subsequent communication frame, data is transferred by the slave device from its slave input to its slave output in the same clock cycle.

12. The serial communication apparatus of claim 11, wherein the delay between the slave input and slave output is k bytes, where k is the position of the slave device in the daisy chain.

13. The serial communication device of claim 11, wherein the delay between the slave input and slave output is k sub-byte syllables, where k is the position of the slave device in the daisy chain.

14. A method of transmitting data between devices in a serial communication device, the serial communication device comprising a master device, a plurality of slave devices, the master device having a master input and a master output, the plurality of slave devices each comprising a slave input and a slave output, the plurality of slave devices being arranged in a daisy chain configuration, wherein a first slave device is arranged to receive data from the master output at its slave input, and one or more successive slave devices are arranged to receive data from the slave output of a preceding slave device; in, According to the method, The master device sends a communication frame including a sub-byte syllable, the communication frame including a device address byte defining a slave device address, and the sub-byte syllable is provided as an initial portion of the address byte; The slave device receives the communication frame at its slave input; Wherein the triggered data transfer from the slave input to the slave output begins before the remainder of the device address byte is received by the slave input.

15. The method of claim 14, wherein the sub-byte syllable comprises one bit.

16. The method of claim 15, wherein the one bit remains at a first logic value to indicate the start of a communication frame.

17. The method of claim 14, wherein ultimately the slave device adjusts delays to ensure that input to the master device is byte aligned.

18. The method of claim 17, wherein the adjustment of the delay is set by a dedicated command embedded in the communication frame.

19. The method of claim 18, wherein the adjustment of the delay is set by a dedicated command embedded in the address byte.

20. The method of claim 17, wherein the adjustment of the delay is set by a register in the slave device, the register having a value that can be set to tell a slave device to perform byte alignment.

21. The method of claim 14, wherein each slave device stores its identification to determine its position in the daisy chain of slave devices and transfers data from slave input to slave output in the same clock cycle during transmission of a communication frame.

22. The method of claim 21, in: During transmission of an initial communication frame, each slave device determines its position in the daisy chain based on a delay between the slave input and slave output for the slave device; And thereafter during transmission of a subsequent communication frame, data is transferred by the slave device from its slave input to its slave output in the same clock cycle.

23. The method of claim 14, said method being part of a serial peripheral interface protocol.

24. A method of transmitting data between devices in a serial communication device, the serial communication device comprising a master device, a plurality of slave devices, the master device having a master input and a master output, the plurality of slave devices each comprising a slave input and a slave output, the plurality of slave devices being arranged in a daisy chain configuration, wherein a first slave device is arranged to receive data from the master output at its slave input, and one or more successive slave devices are arranged to receive data from the slave output of a preceding slave device; in, According to the method, During transmission of an initial communication frame, each slave device determines its position in the daisy chain based on a delay between the slave input and a slave output for the slave device; And thereafter during transmission of a subsequent communication frame, data is transferred by the slave device from its slave input to its slave output in the same clock cycle.

25. The method of claim 24, wherein the delay between the slave input and slave output is k bytes, where k is the position of the slave device in the daisy chain.

26. The method of claim 24, wherein the delay between the slave input and slave output is k sub-byte syllables, where k is the position of the slave device in the daisy chain.