Data synchronization using serial peripheral interface (SPI) protocol

WO2024174213A1PCT designated stage expired Publication Date: 2024-08-29QUALCOMM INC +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/078069
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2024-08-29

Smart Images

  • Figure CN2023078069_29082024_PF_FP_ABST
    Figure CN2023078069_29082024_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments include systems and methods for controlling data synchronization between a master device and one or more slave devices using a Serial Peripheral Interface (SPI) protocol. A computing device may be configured to create a communications channel between the master device and the slave device, send a message to the slave device when the master device is ready to send data to the slave device, monitor the communications channel for a pulse interrupt message from the slave device, and send the data to the slave device in response to receiving a pulse interrupt message from the slave device. These operations may be performed as part of a loopback stress test. The results of the loopback stress test may be used to adjust the characteristics of the SPI communications, such as buffer size, a clock rate, or a bit rate.
Need to check novelty before this filing date? Find Prior Art

Description

Data Synchronization Using Serial Peripheral Interface (SPI) ProtocolBACKGROUND

[0001] The Serial Peripheral Interface (SPI) is a communication protocol that is particularly well-suited for low-power devices (e.g., Bluetooth devices, etc. ) . SPI allows for efficient data transfer between devices while consuming minimal power. SPI uses a master-slave configuration in which one device (the master) initiates communication and the other device or devices (slaves) respond. This master-slave configuration may eliminate the need for complex handshaking or synchronization procedures, which may consume a significant amount of power in resource-constrained devices (e.g., wearable devices, etc. ) . In addition, the master device may control the clock speed of the communication, allowing for further power savings.

[0002] SUMMARY

[0003] Various aspects include methods of controlling data synchronization between a master device and one or more slave devices using an SPI protocol. Various aspects may include creating a communications channel between the master device and a slave device, sending a message to the slave device when the master device is ready to send data to the slave device, monitoring the communications channel for a pulse interrupt message from the slave device, and sending the data to the slave device in response to receiving the pulse interrupt message from the slave device.

[0004] In some aspects, sending the message to the slave device when the master device is ready to send data to the slave device may include calling a spi_register_pulse () function that causes the slave device to set a pulse feature that triggers sending an interrupt message to the master device when the slave device is ready to receive data. In some aspects, monitoring the communications channel for a pulse interrupt message from the slave device may include using a SPI MsgReceive ()  function to dequeue and read messages and pulse interrupts from the communications channel and determine whether the slave device is ready to receive data from the master device. In some aspects, sending the data to the slave device may include performing an SPI read or SPI write operation.

[0005] Some aspects may further include performing a loopback stress test. In some aspects, performing the SPI read or the SPI write operation may include performing the SPI read or the SPI write operation as part of the loopback stress test. Some aspects may further include adjusting a characteristic of SPI communications based on a result of the loopback stress test. In some aspects, adjusting the characteristic of SPI communications based on the result of the loopback stress test may include adjusting at least one of a buffer size, a clock rate, or a bit rate based on the result of the loopback stress test.

[0006] Further aspects may include a computing device having a processor configured with processor-executable instructions to perform various operations corresponding to the methods discussed above.

[0007] Further aspects may include a computing device having various means for performing functions corresponding to the method operations discussed above.

[0008] Further aspects may include a non-transitory processor-readable storage medium having stored thereon processor-executable instructions configured to cause a processor to perform various operations corresponding to the method operations discussed above.BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The accompanying drawings, which are incorporated herein and constitute part of this specification, illustrate exemplary embodiments of the claims, and together with the general description given and the detailed description, serve to explain the features herein.

[0010] FIG. 1 is a component block diagram illustrating a computing system that could be configured to implement some embodiments.

[0011] FIG. 2 is an activity diagram illustrating a method of communicating using the Serial Peripheral Interface (SPI) protocol.

[0012] FIG. 3 is an activity diagram illustrating a method of communicating using the SPI protocol in accordance with some embodiments.

[0013] FIGS. 4-6 are process flow diagrams illustrating various methods of controlling data synchronization between a master device and one or more slave devices using an SPI protocol in accordance with various embodiments.

[0014] FIG. 7 is a component block diagram illustrating an example computing device suitable for use with various embodiments.

[0015] FIG. 8 is a component block diagram illustrating an example wireless communication device suitable for use with various embodiments.DETAILED DESCRIPTION

[0016] Various embodiments will be described in detail with reference to the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings to refer to the same or like parts. References made to particular examples and implementations are for illustrative purposes and are not intended to limit the scope of the claims.

[0017] In overview, various embodiments include methods, and computing devices configured to implement the methods, for controlling data synchronization between a master device and one or more slave devices using the Serial Peripheral Interface (SPI) protocol. For example, the computing device may be configured to create a communications channel between the master device and the slave device, use a pulse register function call (e.g., spi_register_pulse () , etc. ) to set a pulse functionality that  indicates the master device is ready to send data to the slave device and / or which causes the slave device to send a trigger message to the master when it is ready to send or receive data, and to use a receive function call (e.g., MsgReceive () , etc. ) to dequeue and read messages and pulses from the communications channel. The receive function call may be used to determine whether the pulse is received from the slave device and to determine whether the slave device is ready to receive data from the master device. As a result, the data synchronization may be performed without introducing an artificial delay between the master and slave devices.

[0018] Various embodiments may improve the performance and functioning of devices that use SPI communications by reducing errors and inconsistencies in the data that is being transferred between the master device and slave devices. Various embodiments may be used to improve the performance of loopback stress tests and / or allow for calibrating the buffer size, clock rate, bit rate, and other characteristics of the SPI communications between various computing device subsystems. Additional improvements to the performance and functioning of computing devices will be evident from the disclosure below.

[0019] Loopback stress testing is commonly used to test systems that use the SPI communication protocol. Loopback stress testing is a method of testing the integrity of a communication system by connecting the transmit and receive lines together. This creates a loopback in which the system sends data and immediately receives it back. By continuously sending and receiving data the system may be placed under conditions of heavy workload (i.e., stressed) to identify weak points, errors, or failures.

[0020] The SPI is a communication protocol that may be used for short-distance communication between microcontrollers, sensors, and other devices. SPI uses a master-slave architecture in which one device (the master) controls the communication and one or more devices (the slaves) respond to the master’s commands. For example, in a SPI write operation, the master sends a command to the  slave to write data to a specific register or memory location. In a SPI read operation, the master sends a command to the slave to read a specific register or memory location and the slave sends the data back to the master. If the slave successfully reads and writes the data, the next round of communications may begin. That is, the next round of communications may begin before the master receives or verifies that the SPI read or write operations were completed successfully.

[0021] While the SPI protocol includes a number of useful features, SPI does not provide adequate controls for data synchronization between the master and slave devices. For example, when the spi_read and spi_write functions are called separately, there is a lack of synchronization between the two functions (spi_read and spi_write) . The slave could be a “slothful node” that does not perform the read or write operations at the expected speed. Since the master does not know whether the slave has completed reading before the next communication round begins, the master could continue to write new data before the slave has performed the requested read or write operation. This could cause errors and inconsistencies in the data being transferred between the master and slave devices. This lack of synchronization may be especially problematic when performing loopback stress tests on read and write operations because loopback stress testing often replicates data synchronization issues (e.g., errors and inconsistencies in the data) much more readily than single read or write operations.

[0022] Thus, due to a lack of feedback and adequate data controls, the master has no way of knowing whether the slave received the data successfully and could send additional data to the slave before the slave is ready to receive it. Various embodiments may ensure that the data read operations is successfully completed by the slave before proceeding to the next round or write / read operations.

[0023] Some embodiments may overcome the above-described limitations in the SPI protocol by adding a delay (sleep 0.1 ms) to reduce the probability of errors. However, adding a delay may have a negative impact on the performance and  efficiency of some systems. In addition, the delay or sleep time required may be different for different devices, making it challenging to develop a solution that this suitable for use in a wide verity of devices. In addition, the delay time may be cumulative or much greater in large stress testing loops (e.g., in systems that perform the R / W loop ten-thousand times, etc. ) , which may further reduce the benefits of implementing a delay-based solution.

[0024] Some embodiments may overcome the above-described limitations by configuring the devices to ensure proper synchronization between the master and slave devices. Some embodiments may include a pulse control component, such as within the master device or a computing device that includes the master and slave devices. The pulse control component may be configured to manage, conduct, or control the timing of data transfers (data synchronization) between the master and slave devices. For example, the pulse control component may control the timing of the clock pulses that are used to transfer data between the master and slave devices. By controlling the timing of the clock pulses, the pulse control component may allow the devices to transfer data more accurately and with fewer errors.

[0025] Some embodiments may implement pulse control by using a clock signal to synchronize the data transfer between the master and slave devices. The clock signal may be generated by the master device and used to control the data transfer timing. By controlling the timing of the data transfer, the master device may ensure that the slave device is ready to receive or send data at the appropriate time.

[0026] In some embodiments, the computing device may be configured to use the SPI protocol to control data synchronization between a master device and one or more slave devices. For example, the computing device may create a communications channel between the master device and the slave device using ChannelCreate () kernel calls (e.g.., ChannelCreate_r () , MsgSend () , MsgReceive_r () , etc. ) , use a spi_register_pulse () function call to set a pulse indicating the master device is ready to send data to the slave device, and use a MsgReceive () function call to dequeue and  read messages and pulses from the communications channel. The MsgReceive () function call may be used to determine whether the pulse is received from the slave device and to determine whether the slave device is ready to receive data from the master device. As a result, the data synchronization may be performed without introducing an artificial delay between the master and slave devices.

[0027] Various embodiments may be implemented on a number of single processor and multiprocessor computer systems, including a system-on-chip (SOC) or system in a package (SIP) . FIG. 1 illustrates an example computing system or SIP 100 architecture that may be used in user equipment (UE) devices implementing various embodiments.

[0028] With reference to FIG. 1, the illustrated example SIP 100 includes a two SOCs 102, 104, a clock 106, a voltage regulator 108, and a wireless transceiver 166. The first and second SOC 102, 104 may communicate via interconnection / bus module 150. The various processors 110, 112, 114, 116, 118, 121, 122, may be interconnected to each other and to one or more memory elements 120, system components and resources 124 and a thermal management unit 132 via an interconnection / bus module 126. Similarly, the processor 152 may be interconnected to the power management unit 154, the mmWave transceivers 156, memory 158, and various additional processors 160 via the interconnection / bus module 164. The interconnection / bus module 126, 150, 164 may include an array of reconfigurable logic gates and / or implement a bus architecture (e.g., CoreConnect, AMBA, etc. ) . Communications may be provided by advanced interconnects, such as high-performance networks-on chip (NoCs) .

[0029] The interconnection / bus modules 126, 150 may include a driver module that utilizes the Serial Peripheral Interface (SPI) cable to facilitate communications between any or all of the components in the SIP 100, such as between the applications processor 116 and the 5G modem processor 152 and / or between application processor 216 and the coprocessor 218, etc. The driver module may package and send messages  through the SPI cable and / or may interpret incoming messages from the cable, thereby improving the efficiency of the communications.

[0030] In some embodiments, the first SOC 102 operate as central processing unit (CPU) of the UE device that carries out the instructions of software application programs by performing the arithmetic, logical, control and input / output (I / O) operations specified by the instructions. In some embodiments, the second SOC 104 may operate as a specialized processing unit. For example, the second SOC 104 may operate as a specialized 5G processing unit responsible for managing high volume, high speed (e.g., 5 Gbps, etc. ) , and / or very high frequency short wavelength (e.g., 28 GHz mmWave spectrum, etc. ) communications.

[0031] The first SOC 102 may include a digital signal processor (DSP) 110, a modem processor 112, a graphics processor 114, an application processor 116, one or more coprocessors 118 (e.g., vector co-processor) connected to one or more of the processors, memory 120, deep processing unit (DPU) 121, AI processor 122, system components and resources 124, an interconnection / bus module 126, one or more temperature sensors 130, a thermal management unit 132, and a thermal power envelope (TPE) component 134. The second SOC 104 may include a 5G modem processor 152, a power management unit 154, an interconnection / bus module 164, a plurality of mmWave transceivers 156, memory 158, and various additional processors 160, such as an applications processor, packet processor, etc.

[0032] Each processor 110, 112, 114, 116, 118, 121, 122, 121, 122, 152, 160 may include one or more cores, and each processor / core may perform operations independent of the other processors / cores. For example, the first SOC 102 may include a processor that executes a first type of operating system (e.g., FreeBSD, LINUX, OS X, etc. ) and a processor that executes a second type of operating system (e.g., MICROSOFT WINDOWS 10) . In addition, any or all of the processors 110, 112, 114, 116, 118, 121, 122, 121, 122, 152, 160 may be included as part of a  processor cluster architecture (e.g., a synchronous processor cluster architecture, an asynchronous or heterogeneous processor cluster architecture, etc. ) .

[0033] The first and second SOC 102, 104 may include various system components, resources and custom circuitry for managing sensor data, analog-to-digital conversions, wireless data transmissions, and for performing other specialized operations, such as decoding data packets and processing encoded audio and video signals for rendering in a web browser. For example, the system components and resources 124 of the first SOC 102 may include power amplifiers, voltage regulators, oscillators, phase-locked loops, peripheral bridges, data controllers, memory controllers, system controllers, Access ports, timers, and other similar components used to support the processors and software clients running on a UE device. The system components and resources 124 may also include circuitry to interface with peripheral devices, such as cameras, electronic displays, wireless communication devices, external memory chips, etc.

[0034] The first and / or second SOCs 102, 104 may further include an input / output module (not illustrated) for communicating with resources external to the SOC, such as a clock 106, a voltage regulator 108, and a wireless transceiver 166 (e.g., cellular wireless transceiver, Bluetooth transceiver, etc. ) . Resources external to the SOC (e.g., clock 106, voltage regulator 108, wireless transceiver 166) may be shared by two or more of the internal SOC processors / cores.

[0035] In some embodiments, any or all of the processors 110, 112, 114, 116, 118, 121, 122, 121, 122, 152, 160 may be configured to control data synchronization between a master device (e.g., applications processor 116, etc. ) and one or more slave devices (e.g., 5G modem processor 152, etc. ) using the SPI protocol in accordance with various embodiments. As an example, a processor may be configured to control data synchronization by creating a communications channel between a master component and a slave component, determining whether the master component is ready to send data to the slave component, sending a message to the slave component  in response to determining that the master component is ready to send data to the slave component, monitoring the communications channel to determine whether a pulse interrupt message was received from the slave component, and sending the data to the slave component in response to determining that the pulse interrupt message was received from the slave component.

[0036] The processor may send the message to the slave component by calling a spi_register_pulse () function that causes the slave component to set a pulse feature that triggers sending an interrupt message to the master component when the slave component is ready to receive data. The processor may monitor the communications channel by using a SPI MsgReceive () function to dequeue and read messages and pulse interrupts from the communications channel and determine whether the slave device is ready to receive data from the master device. The processor may send the data to the slave device by performing an SPI read or SPI write operation and / or as part of a loopback stress test. In some embodiments, the processor may adjust a characteristic of SPI communications (e.g., buffer size, a clock rate, a bit rate, etc. ) based on the results of a loopback stress test.

[0037] In addition to the example SIP 100 discussed above, various embodiments may be implemented in a wide variety of computing systems, which may include a single processor, multiple processors, multicore processors, or any combination thereof.

[0038] FIG. 2 is an activity diagram that illustrates a method of communicating using the SPI protocol in a system that includes a master application 250, a master SPI client 252, a master SPI RM 254, a slave SPI RM 256, a slave SPI client 258 and a slave application 260. With reference to FIGs. 1 and 2, in operation 202, the slave application 260 may send a Spi_open (slave node) call message to the slave SPI client 258. Spi_open () may be a function that is used to open a connection to an SPI device, initialize the communications, and / or prepare the device for sending and receiving data. The spi_open () may also include various other parameters, such as the device  name, bus number, chip select line, clock speed and other similar communication parameters for the connection. In operation 204, the slave SPI client 258 may send an open (path, RDWR) call message to the slave SPI RM 256. In this message, “RDWR” may be a flag that is used to open a file or device in read-write mode. In operation 206, the slave SPI RM 256 may allocate a buffer for communications.

[0039] In operation 208, the master application 250 may send a Spi_open (master node) call message to the master SPI client 252. In operation 210, the master SPI client 252 may send an open (path, RDWR) call message to the master SPI RM 254. In operation 212, the master SPI RM 254 may allocate a buffer for communications. The buffer may be a specific register or memory location.

[0040] In operation 214, the slave application 260 may send a Spi_read call message to the slave SPI client 258. In a SPI read operation, the master sends a command to the slave to read a specific register or memory location and the slave sends the data back to the master. If the slave successfully reads and writes the data, the next round of communications may begin.

[0041] In operation 216, the slave SPI client 258 may send a devctlv (DCMD_SPI_READ) call message to the slave SPI RM 256. The devctlv function is the communication interface between the SPI client and the SPI resource manager. The DCMD_SPI_READ information unit may be a command used to read data from a device connected to the SPI bus. The response may indicate the type of transfer event, and the SPI RM 256 may process the event according to a “DCMD” value, for example, SPI Write, SPI Read, SPI Exchange, etc. In operation 218, the slave SPI RM 256 may prepare the slave to perform a read or write operation.

[0042] In operation 220, the master application 250 may send a Spi_write call message to the master SPI client 252. in a SPI write operation, the master sends a command to the slave to write data to a specific register or memory location. In operation 222, the master SPI client 252 may send a devctlv (DCMD_SPI_WRITE)  call message to the master SPI RM 254. The DCMD_SPI_WRITE information unit may be a command used to write data to a device connected to the SPI bus. In operation 224, the master SPI RM 254 may send data to the slave SPI RM 256. In conventional solutions, the next round of communications begins before the master receives or verifies that the SPI read or write operations were completed successfully.

[0043] In operations 226 and 228, the slave SPI RM 256 may send the data to the slave application 260. In operations 230 and 232, the master SPI RM 254 may send the data to the master application 250. In operation 234, the slave application 260 may send a Spi_close (slave_fd) call message to the slave SPI client 258. The spi_close function may allow clients to close the handle to the SPI RM 256, and SPI RM 256 will free a corresponding buffer. In operation 236, the slave SPI client 258 may send a Close (slave_fd) call message to the slave SPI RM 256. The Close () and Spi_close () functions may be used to close the connection to the SPI device, release the resources associated with the communication, and / or close the communication channel. In operation 244, the slave SPI RM 256 may release resources (e.g., memory buffers, file handles, etc. ) allocated during the communication, disabling the chip select line of the device, and restoring the settings of the SPI bus.

[0044] In operation 238, the master application 250 may send a Spi_close (master node) call message to the master SPI client 252. In operation 240, the master SPI client 252 may send a close (master node) call message to the master SPI RM 254. In operation 242, the master SPI RM 254 may release resources (e.g., memory buffers, file handles, etc. ) allocated during the communication.

[0045] FIG. 3 is an activity diagram that illustrates a method of communicating using the SPI protocol in accordance with some embodiments. With reference to FIGs. 1-3, in operations 202-218, the master application 250, master SPI client 252, master SPI RM 254, slave SPI RM 256, slave SPI client 258 and slave application 260 may perform the operations discussed above with reference to FIG. 2. In addition, in operation 302, the master application 250 may create a thread, create a  communications channel between the master and slave components, and send a message to the slave device when the master device is ready to send data to the slave device. For example, the master application 250 may create the communications channel by using ChannelCreate () kernel calls (e.g.., ChannelCreate_r () , MsgSend () , MsgReceive_r () , etc. ) , use a spi_register_pulse () function call to set a pulse indicating the master device is ready to send data to the slave device.

[0046] In operation 304, the master application 250 may wait for a trigger from the slave device, which may include monitoring the communications channel for a pulse interrupt message from the slave device. For example, the master application 250 may use a MsgReceive () function call to dequeue and read messages and pulses from the communications channel until it determines that a pulse interrupt message is received from the slave device (and thus the slave device is ready to receive data from the master device) .

[0047] After completing the operations in 218 to prepare the slave to perform the read or write operation, the slave SPI RM 256 may send the pulse interrupt message to the master application 250 in operation 306. In response to receiving the pulse interrupt message, the master application 250, master SPI client 252, master SPI RM 254, slave SPI RM 256, slave SPI client 258 and slave application 260 may perform the operations discussed above with reference operations 220-244 and FIG. 2.

[0048] By waiting to receive confirmation that the slave device is ready to receive data from the master device, various embodiments may improve the performance and functioning of devices that use SPI communications by reducing errors and inconsistencies in the data being transferred between the master and slave devices. The embodiments may also improve the performance of loopback stress tests and / or allow for calibrating the buffer size, clock rate, bit rate, and other characteristics of the SPI communications between various computing device subsystems.

[0049] FIG. 4 illustrates a method 400 of controlling data synchronization between a master device and one or more slave devices within a computing device using the SPI protocol in accordance with some embodiments. With reference to FIGS. 1-4, the operations of the method 400 may be performed by circuitry or a processor (e.g., 110, 112, 114, 116, 118, 152, 160) of a computing device (e.g., 100, 700, 800) , and is referred to generally as a “processor. ” Similarly, means for performing the operations of the method may include a processor (e.g., 110, 112, 114, 116, 118, 152) , circuitry of a master device, or another suitable processor (e.g., 110, 112, 114, 116, 118, 152, 160) of a computing device (e.g., 100, 700, 800) .

[0050] In block 402, the computing device may create a communications channel between the master device and the slave device. For example, the computing device may create a communications channel between the master device and the slave device using ChannelCreate () kernel calls (e.g., ChannelCreate_r () , MsgSend () , MsgReceive_r () , etc. ) .

[0051] In block 404, the computing device may send a message to the slave device when the master device is ready to send data to the slave device. In some embodiments, the computing device may call a spi_register_pulse () function that causes the slave device to set a pulse feature that triggers sending an interrupt message to the master device when the slave device is ready to receive data.

[0052] In block 406, the computing device may monitor the communications channel for a pulse interrupt message from the slave device. For example, the computing device may use a SPI MsgReceive () function to dequeue and read messages and pulse interrupts from the communications channel and determine whether the slave device is ready to receive data from the master device.

[0053] In block 408, the computing device may send the data to the slave device in response to receiving a pulse interrupt message from the slave device. For example, the computing device may perform an SPI read or SPI write operation in block 408.  In a SPI write operation, the master sends a command to the slave to write data to a specific register or memory location. In a SPI read operation, the master sends a command to the slave to read a specific register or memory location and the slave sends the data back to the master.

[0054] FIG. 5 illustrates another method 500 of using the methods of controlling data synchronization between a master device and one or more slave devices using the SPI protocol for purposes of conducting a loopback stress test in accordance with some embodiments. With reference to FIGS. 1-5, the operations of the method 500 may be performed by circuitry or a processor (e.g., 110, 112, 114, 116, 118, 152, 160) of a computing device (e.g., 100, 700, 800) , and is referred to generally as a “processor. ” Similarly, means for performing the operations of the method may include a processor (e.g., 110, 112, 114, 116, 118, 152) , circuitry of a master device, or another suitable processor (e.g., 110, 112, 114, 116, 118, 152, 160) of a computing device (e.g., 100, 700, 800) .

[0055] In blocks 404-408, the computing device may perform the operations of the like numbered blocks of the method 400 as described. To perform a loopback stress test, the operations in blocks 404-408 may be performed repeatedly in a loop.

[0056] In determination block 502 the computing device may determine whether sufficient repetitions of the operations in blocks 404-408 have been performed to complete the loopback stress test.

[0057] In response to determining that sufficient repetitions of the operations in blocks 404-408 have not been performed for the loopback stress test (i.e., determination block 502 = “No” ) , the computing device may repeat the operations in blocks 404-408.

[0058] In response to determining that sufficient repetitions of the operations in blocks 404-408 have been performed for the loopback stress test (i.e., determination  block 502 = “Yes” ) , the computing device may end the loopback stress test in block 504.

[0059] FIG. 6 illustrates another method 600 of performing a loopback stress test of master and slave devices using the SPI protocol in accordance with some embodiments. With reference to FIGS. 1-6, the operations of the method 600 may be performed by circuitry or a processor (e.g., 110, 112, 114, 116, 118, 152, 160) of a computing device (e.g., 700) , and is referred to generally as a “processor. ” Similarly, means for performing the operations of the method may include a processor (e.g., 110, 112, 114, 116, 118, 152) , circuitry of a master device, or another suitable processor (e.g., 110, 112, 114, 116, 118, 152, 160) of a computing device (e.g., 700) .

[0060] In blocks 402-408, the computing device may perform the operations of the methods 400 and 500 as described.

[0061] In determination block 502 the computing device may determine whether sufficient repetitions of the operations in blocks 404-408 have been performed to complete the loopback stress test.

[0062] In response to determining that sufficient repetitions of the operations in blocks 404-408 have not been performed for the loopback stress test (i.e., determination block 502 = “No” ) , the computing device may repeat the operations in blocks 404-408.

[0063] In response to determining that sufficient repetitions of the operations in blocks 404-408 have been performed for the loopback stress test (i.e., determination block 502 = “Yes” ) , the computing device may end the loopback stress test and use the results of the stress test to adjust a characteristic of SPI communications between the master and slave devices in block 602. For example, the computing device may adjust at least one of a buffer size, a clock rate, or a bit rate of the SPI communications based on the result of the loopback stress test.

[0064] Various embodiments (including, but not limited to, embodiments described above with reference to FIGS. 1-6) may be implemented in a wide variety of computing systems include a laptop computer 700, an example of which is illustrated in FIG. 7. With reference to FIGS. 1-7, a laptop computer may include a touchpad touch surface 717 that serves as the computer’s pointing device, and thus may receive drag, scroll, and flick gestures similar to those implemented on computing devices equipped with a touch screen display and described above. A laptop computer 700 will typically include a processor 702 coupled to volatile memory 712 and a large capacity nonvolatile memory, such as a disk drive 713 of Flash memory. Additionally, the computer 700 may have one or more antenna 708 for sending and receiving electromagnetic radiation that may be connected to a wireless data link and / or cellular telephone transceiver 716 coupled to the processor 702. The computer 700 may also include a BT transceiver 714 and a compact disc (CD) drive 715 coupled to the processor 702. The laptop computer 700 may include a keyboard 718, and a display 719 all coupled to the processor 702. Other configurations of the computing device may include a computer mouse or trackball coupled to the processor (e.g., via a Universal Serial Bus input) as are well known, which may also be used in conjunction with various embodiments.

[0065] FIG. 8 is a component block diagram of a computing device 800 suitable for use with various embodiments. With reference to FIGS. 1–8, various embodiments may be implemented on a variety of computing devices 800, an example of which is illustrated in FIG. 8 in the form of a smartphone. The computing device 800 may include a first SOC 102 coupled to a second SOC 104. The first and second SoCs 102, 104 may be coupled to internal memory 816, a display 812, and to a speaker 814. The first and second SoCs 102, 104 may also be coupled to at least one SIM and / or a SIM interface that may store information supporting a first 5GNR subscription and a second 5GNR subscription, which support service on a 5G non-standalone (NSA) network.

[0066] The computing device 800 may include an antenna 804 for sending and receiving electromagnetic radiation that may be connected to a wireless transceiver coupled to one or more processors in the first and / or second SoCs 102, 104. The computing device 800 may also include menu selection buttons or rocker switches 820 for receiving user inputs.

[0067] The computing device 800 also includes a sound encoding / decoding (CODEC) circuit 810, which digitizes sound received from a microphone into data packets suitable for wireless transmission and decodes received sound data packets to generate analog signals that are provided to the speaker to generate sound. Also, one or more of the processors in the first and second SoCs 102, 104, wireless transceiver and CODEC 810 may include a digital signal processor (DSP) circuit (not shown separately) .

[0068] The first and second SoCs 102, 104 may be any programmable microprocessor, microcomputer or multiple processor chip or chips that can be configured by software instructions (applications) to perform a variety of functions, including the functions of various embodiments. In some devices, multiple processors may be provided, such as one processor dedicated to wireless communication functions and one processor dedicated to running other applications. Typically, software applications may be stored in an internal memory before they are accessed and loaded into the SOC. The SOC may include internal memory sufficient to store the application software instructions. In many devices the internal memory may be a volatile or nonvolatile memory, such as flash memory, or a mixture of both. For the purposes of this description, a general reference to memory refers to memory accessible by the SOC including internal memory or removable memory plugged into the mobile device and memory within the SOC itself.

[0069] The processors of the devices discussed in this application (e.g., 100, 700, 800) may be any programmable microprocessor, microcomputer, or multiple processor chip or chips that can be configured by software instructions (applications) to perform a variety of functions, including the functions of various embodiments  described. In some mobile devices, multiple processors may be provided, such as one processor within a first circuitry dedicated to wireless communication functions and one processor within a second circuitry dedicated to running other applications. Software applications may be stored in the memory before they are accessed and loaded into the processor. The processors may include internal memory sufficient to store the application software instructions.

[0070] Implementation examples are described in the following paragraphs. While some of the following implementation examples are described in terms of example methods, further example implementations may include: the example methods discussed in the following paragraphs implemented by a computing device including a processor configured with processor-executable instructions to perform operations of the methods of the following implementation examples; the example methods discussed in the following paragraphs implemented by a computing device including means for performing functions of the methods of the following implementation examples; and the example methods discussed in the following paragraphs may be implemented as a non-transitory processor-readable storage medium having stored thereon processor-executable instructions configured to cause a processor of a computing device to perform the operations of the methods of the following implementation examples.

[0071] Example 1: A method of controlling data synchronization between a master device and one or more slave devices using a Serial Peripheral Interface (SPI) protocol, including creating a communications channel between the master device and the slave device, sending a message to the slave device when the master device is ready to send data to the slave device, monitoring the communications channel for a pulse interrupt message from the slave device, and sending the data to the slave device in response to receiving the pulse interrupt message from the slave device.

[0072] Example 2: The method of example 1 in which sending the message to the slave device when the master device is ready to send data to the slave device includes  calling a spi_register_pulse () function that causes the slave device to set a pulse feature that triggers sending an interrupt message to the master device when the slave device is ready to receive data.

[0073] Example 3: The method of either of examples 1 or 2 in which monitoring the communications channel for a pulse interrupt message from the slave device includes using a SPI MsgReceive () function to dequeue and read messages and pulse interrupts from the communications channel and determines whether the slave device is ready to receive data from the master device.

[0074] Example 4: The method of any of examples 1-3 in which sending the data to the slave device includes performing an SPI read or SPI write operation.

[0075] Example 5: The method of any of examples 1-4, further including performing a loopback stress test.

[0076] Example 6: The method of example 5, in which performing the SPI read or SPI write operation includes performing the SPI read or SPI write operation as part of the loopback stress test.

[0077] Example 7: The method of example 6, further including adjusting a characteristic of SPI communications based on a result of the loopback stress test.

[0078] Example 8: The method of example 7, in which adjusting the characteristic of SPI communications based on the result of the loopback stress test includes adjusting at least one of a buffer size, a clock rate, or a bit rate based on the result of the loopback stress test.

[0079] As used in this application, the terms “component, ” “module, ” “system, ” and the like are intended to include a computer-related entity, such as, but not limited to, hardware, firmware, a combination of hardware and software, software, or software in execution, which are configured to perform particular operations or functions. For example, a component may be, but is not limited to, a process running on a processor,  a processor, an object, an executable, a thread of execution, a program, and / or a computer. By way of illustration, both an application running on a computing device and the computing device may be referred to as a component. One or more components may reside within a process and / or thread of execution and a component may be localized on one processor or core and / or distributed between two or more processors or cores. In addition, these components may execute from various non-transitory computer readable media having various instructions and / or data structures stored thereon. Components may communicate by way of local and / or remote processes, function or procedure calls, electronic signals, data packets, memory read / writes, and other known network, computer, processor, and / or process related communication methodologies.

[0080] A number of different cellular and mobile communication services and standards are available or contemplated in the future, all of which may implement and benefit from various embodiments. Such services and standards include, e.g., third generation partnership project (3GPP) , Long Term Evolution (LTE) systems, third generation wireless mobile communication technology (3G) , fourth generation wireless mobile communication technology (4G) , fifth generation wireless mobile communication technology (5G) as well as later generation 3GPP technology, global system for mobile communications (GSM) , universal mobile telecommunications system (UMTS) , 3GSM, general Packet Radio service (GPRS) , code division multiple access (CDMA) systems (e.g., cdmaOne, CDMA1020TM) , enhanced data rates for GSM evolution (EDGE) , advanced mobile phone system (AMPS) , digital AMPS (IS-136 / TDMA) , evolution-data optimized (EV-DO) , digital enhanced cordless telecommunications (DECT) , Worldwide Interoperability for Microwave Access (WiMAX) , wireless local area network (WLAN) , Wi-Fi Protected Access I &II (WPA, WPA2) , and integrated digital enhanced network (iDEN) . Each of these technologies involves, for example, the transmission and reception of voice, data, signaling, and / or content messages. It should be understood that any references to terminology and / or technical details related to an individual telecommunication  standard or technology are for illustrative purposes only, and are not intended to limit the scope of the claims to a particular communication system or technology unless specifically recited in the claim language.

[0081] Various embodiments illustrated and described are provided merely as examples to illustrate various features of the claims. However, features shown and described with respect to any given embodiment are not necessarily limited to the associated embodiment and may be used or combined with other embodiments that are shown and described. Further, the claims are not intended to be limited by any one example embodiment. For example, one or more of the operations of the methods may be substituted for or combined with one or more operations of the methods.

[0082] The foregoing method descriptions and the process flow diagrams are provided merely as illustrative examples and are not intended to require or imply that the operations of various embodiments must be performed in the order presented. As will be appreciated by one of skill in the art the order of operations in the foregoing embodiments may be performed in any order. Words such as “thereafter, ” “then, ” “next, ” etc. are not intended to limit the order of the operations; these words are simply used to guide the reader through the description of the methods. Further, any reference to claim elements in the singular, for example, using the articles “a, ” “an” or “the” is not to be construed as limiting the element to the singular.

[0083] The various illustrative logical blocks, modules, circuits, and algorithm operations described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and operations have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such  implementation decisions should not be interpreted as causing a departure from the scope of the claims.

[0084] The hardware used to implement the various illustrative logics, logical blocks, modules, and circuits described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor (DSP) , an application specific integrated circuit (TCUASIC) , a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but, in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. Alternatively, some operations or methods may be performed by circuitry that is specific to a given function.

[0085] In one or more embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored as one or more instructions or code on a non-transitory computer-readable medium or non-transitory processor-readable medium. The operations of a method or algorithm disclosed herein may be embodied in a processor-executable software module, which may reside on a non-transitory computer-readable or processor-readable storage medium. Non-transitory computer-readable or processor-readable storage media may be any storage media that may be accessed by a computer or a processor. By way of example but not limitation, such non-transitory computer-readable or processor-readable media may include RAM, ROM, EEPROM, FLASH memory, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that may be used  to store desired program code in the form of instructions or data structures and that may be accessed by a computer. Disk and disc, as used herein, includes compact disc (CD) , laser disc, optical disc, digital versatile disc (DVD) , floppy disk, and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above are also included within the scope of non-transitory computer-readable and processor-readable media. Additionally, the operations of a method or algorithm may reside as one or any combination or set of codes and / or instructions on a non-transitory processor-readable medium and / or computer-readable medium, which may be incorporated into a computer program product.

[0086] The preceding description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the claims. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the scope of the claims. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the following claims and the principles and novel features disclosed herein.

Claims

1.A method of controlling data synchronization between a master device and one or more slave devices using a Serial Peripheral Interface (SPI) protocol, the method comprising:creating a communications channel between the master device and the slave device;sending a message to the slave device when the master device is ready to send data to the slave device;monitoring the communications channel for a pulse interrupt message from the slave device; andsending the data to the slave device in response to receiving the pulse interrupt message from the slave device.2.The method of claim 1, wherein sending the message to the slave device when the master device is ready to send data to the slave device comprises calling a spi_register_pulse () function that causes the slave device to set a pulse feature that triggers sending an interrupt message to the master device when the slave device is ready to receive data.3.The method of claim 1, wherein monitoring the communications channel for a pulse interrupt message from the slave device comprises using a SPI MsgReceive () function to dequeue and read messages and pulse interrupts from the communications channel and determine whether the slave device is ready to receive data from the master device.4.The method of claim 1, wherein sending the data to the slave device comprises performing an SPI read or SPI write operation.5.The method of claim 4, further comprising performing a loopback stress test, wherein performing the SPI read or SPI write operation comprises performing the SPI read or SPI write operation as part of the loopback stress test.6.The method of claim 5, further comprising adjusting a characteristic of SPI communications based on a result of the loopback stress test.7.The method of claim 6, wherein adjusting the characteristic of SPI communications based on the result of the loopback stress test comprises adjusting at least one of a buffer size, a clock rate, or a bit rate based on the result of the loopback stress test.8.A computing device, comprising:a processor configured to:create a communications channel between the computing device and a slave device using a Serial Peripheral Interface (SPI) protocol;send a message to the slave device when the computing device is ready to send data to the slave device;monitor the communications channel for a pulse interrupt message from the slave device; andsend the data to the slave device in response to receiving a pulse interrupt message from the slave device.9.The computing device of claim 8, wherein the processor is configured to send the message to the slave device when the computing device is ready to send data to the slave device by calling a spi_register_pulse () function that causes the slave device to set a pulse feature that triggers sending an interrupt message to the computing device when the slave device is ready to receive data.10.The computing device of claim 8, wherein the processor is configured to monitor the communications channel for a pulse interrupt message from the slave device by using a SPI MsgReceive () function to dequeue and read messages and pulse interrupts from the communications channel and determine whether the slave device is ready to receive data from the computing device.11.The computing device of claim 8, wherein the processor is configured to send the data to the slave device by performing an SPI read or SPI write operation.12.The computing device of claim 11, wherein the processor is further configured to perform a loopback stress test, and perform the SPI read or SPI write operation as part of the loopback stress test.13.The computing device of claim 12, wherein the processor is further configured to adjust a characteristic of SPI communications based on a result of the loopback stress test.14.The computing device of claim 13, wherein the processor is configured to adjust the characteristic of SPI communications based on the result of the loopback stress test by adjusting at least one of a buffer size, a clock rate, or a bit rate based on the result of the loopback stress test.15.A non-transitory computer readable storage medium having stored thereon processor-executable software instructions configured to cause a processor to perform operations for controlling data synchronization between a master device and one or more slave devices using a Serial Peripheral Interface (SPI) protocol, the operations comprising:creating a communications channel between the master device and the slave device;sending a message to the slave device when the master device is ready to send data to the slave device;monitoring the communications channel for a pulse interrupt message from the slave device; andsending the data to the slave device in response to receiving a pulse interrupt message from the slave device.16.The non-transitory computer readable storage medium of claim 15, wherein the stored processor-executable software instructions are configured to cause a processor to perform operations such that sending the message to the slave device when the master device is ready to send data to the slave device comprises calling a spi_register_pulse () function that causes the slave device to set a pulse feature that triggers sending an interrupt message to the master device when the slave device is ready to receive data.17.The non-transitory computer readable storage medium of claim 15, wherein the stored processor-executable software instructions are configured to cause a processor to perform operations such that monitoring the communications channel for a pulse interrupt message from the slave device comprises using a SPI MsgReceive () function to dequeue and read messages and pulse interrupts from the communications channel and determine whether the slave device is ready to receive data from the master device.18.The non-transitory computer readable storage medium of claim 15, wherein the stored processor-executable software instructions are configured to cause a processor to perform operations such that sending the data to the slave device comprises performing an SPI read or SPI write operation.19.The non-transitory computer readable storage medium of claim 18, wherein the stored processor-executable software instructions are configured to cause a processor to perform operations further comprising performing a loopback stress test.20.The non-transitory computer readable storage medium of claim 19, wherein the stored processor-executable software instructions are configured to cause a processor to perform operations such that performing the SPI read or SPI write operation comprises performing the SPI read or SPI write operation as part of the loopback stress test.21.The non-transitory computer readable storage medium of claim 20, wherein the stored processor-executable software instructions are configured to cause a processor to perform operations further comprising adjusting a characteristic of SPI communications based on a result of the loopback stress test.22.The non-transitory computer readable storage medium of claim 21, wherein the stored processor-executable software instructions are configured to cause a processor to perform operations such that adjusting the characteristic of SPI communications based on the result of the loopback stress test comprises adjusting at least one of a buffer size, a clock rate, or a bit rate based on the result of the loopback stress test.23.A computing device, comprising:means for creating a communications channel between the computing device and a slave device using a Serial Peripheral Interface (SPI) protocol;means for sending a message to the slave device when the computing device is ready to send data to the slave device;means for monitoring the communications channel for a pulse interrupt message from the slave device; andmeans for sending the data to the slave device in response to receiving a pulse interrupt message from the slave device.24.The computing device of claim 23, wherein means for sending the message to the slave device when the computing device is ready to send data to the slave device comprises means for calling a spi_register_pulse () function that causes the slave device to set a pulse feature that triggers sending an interrupt message to the computing device when the slave device is ready to receive data.25.The computing device of claim 23, wherein means for monitoring the communications channel for a pulse interrupt message from the slave device comprises means for using a SPI MsgReceive () function to dequeue and read messages and pulse interrupts from the communications channel and determine whether the slave device is ready to receive data from the computing device.26.The computing device of claim 23, wherein means for sending the data to the slave device comprises means for performing an SPI read or SPI write operation.27.The computing device of claim 26, further comprising means for performing a loopback stress test.28.The computing device of claim 27, wherein means for performing the SPI read or SPI write operation comprises means for performing the SPI read or SPI write operation as part of the loopback stress test.29.The computing device of claim 28, further comprising means for adjusting a characteristic of SPI communications based on a result of the loopback stress test.30.The computing device of claim 29, wherein means for adjusting the characteristic of SPI communications based on the result of the loopback stress test comprises means for adjusting at least one of a buffer size, a clock rate, or a bit rate based on the result of the loopback stress test.

Citation Information

Patent Citations

  • High precision timing method based on universal asynchronous serial communication interface

    CN109117410A

  • High-speed SPI master-slave communication method, terminal equipment and storage medium

    CN111737175A

  • CPU network interface performance test board card, test system and test method

    CN111984486A

  • SPI-based master-slave communication method and device

    CN112817886A

  • Programmable I / O interface

    US20050235096A1