Transmission method and sensor device

By adopting clock synchronization communication and data ready pin notification mechanism in sensor devices, the problem of slow transmission speed in the prior art is solved, and faster data transmission efficiency is achieved.

CN119179660APending Publication Date: 2024-12-24SEIKO EPSON CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410787527.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-06-21
Filing Date
2024-06-18
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

Existing sensor devices are slower during data transmission and are difficult to meet faster transmission needs.

Method used

Using the clock synchronization communication method, the sensor device does not accept commands indicating continuous transmission, but prepares a specified amount of transmission data set based on the detection result, and notifies the host of data through the data ready pin, and then data transmission is performed synchronously.

Benefits of technology

The data transmission speed is improved, and the preparation and transmission period from prescribed processing to data transmission is reduced, thereby achieving faster data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179660A_ABST
    Figure CN119179660A_ABST
Patent Text Reader

Abstract

The invention relates to a transmission method and a sensor device. The sensor device which is high in transmission speed is expected to be developed. In a burst mode in which continuous transmission of data is performed from a sensor device to a host by clock synchronous communication, the sensor device prepares a predetermined amount of transmission data group based on a detection result of the sensor device without receiving a command instructing execution of the continuous transmission, and when the preparation of the transmission data group is made, the transmission data group is transmitted to the host by the sensor device. The host is notified of data readiness, and the transmission data group is continuously output to the host that starts reading in response to the data readiness in synchronization with a transmission clock.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a transmission method and a sensor device. Background Art

[0002] At present, it is known that there is a sensor device that detects a detection object such as a physical quantity and sends data representing the detection result to a host. As such a sensor device, for example, the technology disclosed in Patent Document 1 is known. In Patent Document 1, a sensor device that uses a communication standard such as SPI to send a detection result to a host is disclosed.

[0003] Patent Document 1: Japanese Patent Application Publication No. 2019-164443

[0004] It is preferred that the time required to transmit data from the sensor device to the host is short. Therefore, it is desirable to develop a sensor device with a faster transmission speed than the prior art. Summary of the invention

[0005] As an embodiment of a transmission method for solving the above-mentioned technical problem, a transmission method is a transmission method for transmitting data from a sensor device to a host through clock synchronous communication. In a burst mode for continuous data transmission, the sensor device does not accept a command instructing the execution of continuous transmission, but prepares a specified amount of transmission data groups based on the detection results of the sensor device. When the preparation of the transmission data groups is completed, the host is notified that the data is ready, and the transmission data groups are continuously output to the host that starts reading in response to the data being ready in synchronization with the transmission clock.

[0006] In addition, a sensor device as an embodiment for solving the above-mentioned technical problem is a sensor device that transmits data to a host through clock synchronous communication, and the sensor device comprises: a sensor element that detects a physical quantity; a data ready pin that indicates the preparation state of a sending data group; and a data processing circuit. In a burst mode for continuous data transmission, the data processing circuit does not accept a command instructing the execution of continuous transmission, but prepares a specified amount of sending data groups based on the detection results of the sensor element. When the sending data group is prepared, data ready is enabled at the data ready pin, and the sending data group is continuously output to the host that starts reading in response to the data ready in synchronization with the transmission clock. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 This is a configuration example of a sensor device according to one embodiment.

[0008] Figure 2 is a flowchart illustrating the operation of the microcontroller.

[0009] Figure 3 is the timing diagram in burst mode 1.

[0010] Figure 4 is the timing diagram in burst mode 2.

[0011] Figure 5 This is a timing diagram when the burst mode 2 is stopped.

[0012] Description of Reference Numerals

[0013] 10: sensor device; 10a: three-axis gyro sensor; 10b: three-axis acceleration sensor; 10c: temperature sensor; 20: microcontroller; 21: data processing unit; 22: command processing unit; 23: RAM; 23a: setting information storage unit; 23b: sending buffer; 23c: receiving buffer; 24: SPI communication unit; 24a: sending register; 24b: receiving register; 24c: shift register; 30: host. DETAILED DESCRIPTION

[0014] (1) Structure of sensor equipment:

[0015] Hereinafter, preferred embodiments of the present invention will be described in detail. In addition, the embodiments described below do not limit the contents of the present invention described in the claims, and the structures described in the embodiments are not necessarily all the solving means of the present invention.

[0016] exist Figure 1 , an example of the structure of the sensor device 10 of the present embodiment is shown. In the present embodiment, the sensor device 10 is connected to the host 30 so as to be communicable. In the present embodiment, the sensor device 10 and the host 30 communicate in accordance with the SPI standard. The sensor device 10 is provided with terminals TH and TR, and the sensor device 10 and the host 30 are electrically connected via these terminals. In addition, the terminal TH is simplified, but in fact, in order to communicate in accordance with the SPI standard, there are a chip select terminal CS, a clock terminal SCLK, a data input terminal SDI, and a data output terminal SDO. Terminal TR is a data ready pin indicating the preparation state of sending a data group. That is, if the preparation for data transmission from the sensor device 10 to the host 30 is completed, the data ready is enabled for the terminal TR.

[0017] The sensor device 10 is a physical quantity detection module including a plurality of sensor elements. Figure 1 The sensor device 10 includes a three-axis gyro sensor 10 a , a three-axis acceleration sensor 10 b , a temperature sensor 10 c , and a microcontroller 20 .

[0018] In addition, the sensor device 10 is not limited to Figure 1The structure of can be implemented in various modifications such as omitting part of its structural elements or adding other structural elements. Figure 1 Although the sensor device 10 detects three physical quantities, the physical quantities to be detected are not limited to three. Also, the configuration is not limited to three axes that serve as references when detecting physical quantities in units of physical quantities.

[0019] The three-axis gyro sensor 10a is a sensor for detecting angular velocity. The three-axis gyro sensor 10a includes a sensor element for detecting angular velocity in a rotation direction with three pre-set mutually orthogonal axes as rotation axes. In addition, the three-axis gyro sensor 10a is provided with an analog circuit, an A / D conversion circuit, and an interface, which are not shown. When the three-axis gyro sensor 10a detects an angular velocity, the detection result is processed as specified by the analog circuit, and the analog signal representing the processed angular velocity is converted into digital data by the A / D conversion circuit. The digital data output from the A / D conversion circuit is output to the microcontroller 20 via the interface.

[0020] The three-axis acceleration sensor 10b is a sensor for detecting acceleration. The three-axis acceleration sensor 10b includes a sensor element for detecting acceleration in three directions of three predetermined mutually orthogonal axes. In addition, the three-axis acceleration sensor 10b also includes an analog circuit, an A / D conversion circuit, and an interface. That is, the analog signal representing the acceleration detected by the sensor element is processed by the analog circuit, converted into digital data by the A / D conversion circuit, and output to the microcontroller 20.

[0021] The temperature sensor 10c includes a sensor element for detecting the temperature around the temperature sensor 10c. In addition, the temperature sensor 10c also includes an analog circuit, an A / D conversion circuit, and an interface. That is, the analog signal indicating the temperature detected by the sensor element is processed by the analog circuit, converted into digital data by the A / D conversion circuit, and output to the microcontroller 20.

[0022] In the three-axis gyro sensor 10a, the three-axis acceleration sensor 10b, and the temperature sensor 10c, the prescribed processing performed by the analog circuit can be various processing. The analog circuit can include, for example, an amplifier circuit for amplifying the signal from the sensor element, a detection circuit such as a synchronous detection circuit, a gain adjustment circuit or an offset adjustment circuit. Various methods can be used as the A / D conversion method of the A / D conversion circuit. For example, a successive comparison type, a Δ-Σ type, a flash type, a pipeline type, or a double integration type can be used. The interface for outputting digital data from each sensor to the microcontroller 20 can, for example, be an interface for sending and receiving serial data. Specifically, these interfaces perform interface processing of the communication standard of SPI or I2C. Alternatively, it is also possible to perform interface processing of the communication standard of developing the communication standard of SPI or I2C, improving or changing a part of the standard of SPI or I2C.

[0023] The microcontroller 20 is a data processing circuit having a data processing unit 21, a command processing unit 22, a RAM 23, and an SPI communication unit 24. In the present embodiment, the microcontroller 20 is an integrated circuit device, which can be implemented by a processor such as an MPU or a CPU. Alternatively, the microcontroller 20 can also be implemented by an ASIC that automatically configures wiring based on a gate array or the like.

[0024] In the present embodiment, the data processing unit 21 and the command processing unit 22 are functions realized by executing a predetermined program, while the RAM 23 and the SPI communication unit 24 are realized by hardware.

[0025] The RAM 23 is a memory capable of storing any information. In the present embodiment, the RAM 23 includes a setting information storage unit 23a for storing setting information, a transmission buffer 23b for storing transmission data, and a reception buffer 23c for storing reception data. The setting information is information for specifying the mode and various actions of the microcontroller 20. The transmission data is data generated by the data processing unit 21 and transmitted to the host 30. The reception data is data transmitted from the host 30 and received by the sensor device 10.

[0026] The SPI communication unit 24 is an interface unit for performing communication in accordance with the SPI standard. In the present embodiment, the SPI communication unit 24 includes a transmission register 24a, a reception register 24b, and a shift register 24c. The shift register 24c is a register for storing transmission data to be transmitted to the host 30 and reception data received from the host 30. The transmission register 24a is a register capable of storing transmission data of one word. When one word is written into the transmission register 24a from the transmission data stored in the transmission buffer 23b, the transmission data is immediately transferred to the shift register 24c and the transmission register 24a becomes empty. When the transmission register 24a becomes empty, the data to be transmitted next can be written, and the next word is written from the transmission data stored in the transmission buffer 23b to the transmission register 24a. When the transmission data stored in the shift register 24c is transmitted to the host 30 in synchronization with the clock (transmission clock) transmitted by the host 30, the shift register 24c becomes empty, and the transmission data in the transmission register 24a is immediately transferred to the shift register 24c, and the transmission register 24a becomes empty. In this way, the transmission data stored in the transmission buffer 23 b is sequentially transmitted to the host 30 under the control of the host 30 .

[0027] The receiving register 24b is a register capable of storing one word of received data. When one word of data received from the host 30 is stored in the shift register 24c in synchronization with the clock sent by the host 30, the received data is immediately transferred to the receiving register 24b, so that the receiving register 24b becomes full. When the receiving register 24b becomes full, the receiving data can be read out, and the receiving data read out from the receiving register 24b is stored in the receiving buffer 23c. In this way, the receiving data sequentially received from the host 30 is stored in the receiving buffer 23c. In this embodiment, the receiving data includes a command sent from the host 30, and the command stored in the receiving buffer 23c is analyzed by the command processing unit 22.

[0028] The command processing unit 22 analyzes the received data sent from the host 30 and stored in the receiving buffer 23c, and indicates the content of the command to the data processing unit 21. The data processing unit 21 performs processing corresponding to the indicated command. The command can include various commands. For example, a sampling start command, a sampling stop command, a setting information instruction command, a data read command, a data write command, and a command indicating the execution of continuous transmission can be listed.

[0029] In the present embodiment, the sensor device 10 operates in various modes. When the sensor device 10 is powered on, it is initialized, etc., and then the sensor device 10 operates in the configuration mode. In the configuration mode, the sensor device 10 can receive a setting information instruction command. When a sampling start command is received in the configuration mode, or a predetermined transition condition is satisfied, the sensor device 10 transitions to the sampling mode.

[0030] The setting information indication command is a command for causing the setting information to be stored in the setting information storage unit 23a. The setting information can include various information. For example, it includes information indicating the operation mode in the sampling mode. In the present embodiment, the operation mode in the sampling mode includes the normal mode, the burst mode 1, and the burst mode 2. In addition, the burst mode shown in the claims is the burst mode 2.

[0031] The normal mode is a mode in which, when a command is sent from the host 30, the data processing unit 21 performs processing corresponding to the command. The burst mode 1 and the burst mode 2 are modes for performing continuous data transmission. The burst mode 1 is a mode for performing continuous data transmission in response to a command instructing execution of continuous transmission sent from the host 30. The burst mode 2 is a mode for performing continuous data transmission without receiving a command instructing execution of continuous transmission. The sampling stop command is a command for ending sampling. The operations in the burst mode 1 and the burst mode 2 will be described later.

[0032] The setting information may also include various other information. For example, it may include information specifying a physical quantity to be transmitted in burst mode. When the command processing unit 22 analyzes the command as a setting information instruction command, the data processing unit 21 causes the setting information storage unit 23a to store the setting information.

[0033] The data read command is a command for reading data from the sensor device 10 in the normal mode. The command includes, for example, a flag indicating that it is a data read command and an address value of the read object. When the command processing unit 22 analyzes the command as a data read command, the data processing unit 21 reads the data of the address value of the read object stored in the RAM 23 and performs processing for sending the data.

[0034] The data write command is a command for writing data to the sensor device 10 in the normal mode. The command includes, for example, a flag indicating that it is a data write command, an address value of the write object, and data. When the command processing unit 22 analyzes the command as a data write command, the data processing unit 21 writes data to the address value of the write object in the RAM 23.

[0035] The data processing unit 21 performs sampling processing of physical quantities detected by the triaxial gyro sensor 10 a , the triaxial acceleration sensor 10 b , and the temperature sensor 10 c , and executes various processing in accordance with commands.

[0036] The sampling process is performed at a predetermined sampling cycle. In the sampling process, the data processing unit 21 acquires digital data output from the three-axis gyro sensor 10a, the three-axis acceleration sensor 10b, and the temperature sensor 10c. In addition, the data processing unit 21 performs predetermined processing on each acquired digital data.

[0037] The prescribed processing is a process of converting digital data output from the three-axis gyro sensor 10a, the three-axis acceleration sensor 10b, and the temperature sensor 10c into data for transmission to the host 30. The prescribed processing may be various processing, for example, filtering processing, correction processing, etc. The filtering processing is a processing performed at a prescribed sampling period and based on digital data, and is a processing of downsampling at a rate of 1 / K (J, K are integers greater than 2) after calculating a moving average with the latest J as the object of averaging. The correction processing is a processing such as temperature correction performed on the digital data after the filtering processing.

[0038] The digital data generated as described above represents the physical quantity sampled at a certain sampling timing. Here, the angular velocities around the x-axis, y-axis, and z-axis detected by the three-axis gyro sensor 10a are referred to as Gx, Gy, and Gz, respectively. In addition, the accelerations in the x-axis, y-axis, and z-axis directions detected by the three-axis acceleration sensor 10b are referred to as Ax, Ay, and Az, respectively. The temperature detected by the temperature sensor 10c is referred to as Ts. The data processing unit 21 can generate angular velocities Gx, Gy, and Gz, accelerations Ax, Ay, and Az, and temperature Ts through the prescribed processing corresponding to one sampling.

[0039] In this embodiment, the angular velocities Gx, Gy, Gz, the accelerations Ax, Ay, Az, and the temperature Ts are expressed by one word of data, respectively. Therefore, when all the angular velocities Gx, Gy, Gz, the accelerations Ax, Ay, Az, and the temperature Ts are generated, 7 words of data are generated. In the normal mode and the burst mode 1, when the data processing unit 21 generates 7 words of data, the data processing unit 21 enables the terminal TR as the data ready pin.

[0040] When data ready is enabled and data is read in normal mode, the host 30 sends a data read command including address values ​​corresponding to each physical quantity. When the command processing unit 22 analyzes the situation as a data read command, the data processing unit 21 obtains the data representing the physical quantity stored in the address included in the command and writes it into the transmission register 24a. The transmission data stored in the transmission register 24a is transferred to the shift register 24c, and the shift register 24c sends the transmission data to the host 30 in synchronization with the clock sent from the host 30. Here, a method of directly writing to the transmission register 24a is described, but it can also be performed by a method of writing to the transmission register 24a through the transmission buffer 23b.

[0041] As described above, the physical quantity that becomes the object of transmission in burst mode can be specified by setting information. For example, it can be set to output only a part of the angular velocity Gx, Gy, Gz, acceleration Ax, Ay, Az, and temperature Ts. When the physical quantity set according to the setting information is N (N is an integer of 1 to 7), the transmission data that becomes the object of transmission is the amount of N words. That is, the data of the amount of N words is equivalent to the transmission data group of a specified amount. The physical quantity contained in the transmission data group can be specified by setting information. The following is an example of specifying the angular velocity Gx, Gy, Gz, acceleration Ax, Ay, Az by setting information and making the data of 6 words become the transmission data group.

[0042] When data ready is enabled and data is read in normal mode, the host 30 sends a data read command including address values ​​corresponding to each physical quantity. When the command processing unit 22 analyzes the situation as a data read command, the data processing unit 21 obtains the data representing the physical quantity stored in the address included in the command and writes it into the transmission register 24a. The transmission data stored in the transmission register 24a is transferred to the shift register 24c, and the shift register 24c sends the transmission data to the host 30 in synchronization with the clock sent from the host 30. Here, a method of directly writing to the transmission register 24a is described, but it can also be performed by a method of writing to the transmission register 24a through the transmission buffer 23b.

[0043] When the transmission data stored in the transmission register 24a is transferred to the shift register 24c and the transmission register 24a becomes empty, the data processing unit 21 writes the transmission data of the next word from the transmission buffer 23b to the transmission register 24a. Thereafter, whenever the transmission register 24a becomes empty, the data processing unit 21 writes the transmission data of the next word from the transmission buffer 23b to the transmission register 24a, and sequentially sends the transmission data to the host 30 in the same order until the Nth transmission data to be sent. As described above, in the burst mode 1, the data processing unit 21 enables the data ready signal, and prepares to transmit data after receiving the command indicating the execution of continuous transmission. Therefore, the period from the completion of the prescribed processing to the start of data transmission requires the period for receiving the command indicating the execution of continuous transmission and the period for preparing the transmission data of N words. For this reason, in the burst mode 2, the transmission order is determined in a manner to reduce these periods.

[0044] In the burst mode 2 of the present embodiment, the command indicating the execution of continuous transmission is not accepted, but the transmission data of the amount of N words set as the transmission object is sequentially stored in the transmission buffer 23b. The data processing unit 21 writes the transmission data of the amount of 1 word to be initially transmitted into the transmission register 24a. If the shift register 24c is empty, the transmission data stored in the transmission register 24a is transferred to the shift register 24c. In the state before the transmission data to be initially transmitted is transmitted, when the transmission data to be initially transmitted is stored in the transmission register 24a, the transmission data is immediately transferred to the shift register 24c. Therefore, when the transmission data to be initially transmitted is stored in the transmission register 24a or the shift register 24c, it can be regarded that the preparation for transmitting the transmission data of the amount of N words set as the transmission object has been completed.

[0045] For this purpose, in burst mode 2, when the transmission data to be initially transmitted is stored in the transmission register 24a, the data processing unit 21 generates a data ready signal indicating that the transmission preparation of the transmission data of N words set as the transmission object has been completed, and outputs the data ready signal to the host 30 via the terminal TR. That is, the data processing unit 21 enables the terminal TR as the data ready pin. This method is an example, and the terminal TR as the data ready pin may be enabled when the transmission data to be initially transmitted is stored in the shift register 24c. In addition, it is also possible that the setting information includes information specifying the physical quantity to be the transmission object, and at the time point when the data processing is completed for the specified transmission object, the data processing unit 21 completes the preparation of the transmission data group of the specified amount and generates the data ready signal. That is, in burst mode 2, it is also possible not to accept the command indicating the execution of continuous transmission, but to process the data for the transmission object specified as the preparation of the transmission data group.

[0046] The host 30 starts communication in response to the data ready signal. When the host 30 reads out the transmission data of one word in the shift register 24c in synchronization with the clock output by the host 30, the shift register 24c becomes empty. After that, the transmission data group of N words is sequentially transferred to the shift register 24c and read out by the host 30. According to the above structure, in the burst mode 2, a period for receiving the command indicating the execution of the continuous transmission is not provided, but the transmission data of N words is prepared. Therefore, the period from performing the prescribed processing to sending the initial transmission data can be made shorter than that of the burst mode 1.

[0047] (2) Processing in burst mode:

[0048] Next, the processing in the burst mode will be described. Figure 2 is a flowchart showing the processing performed by the sensor device 10 in the sampling mode. Figure 2 , the burst mode 2 is mainly shown in detail. When the operation in the sampling mode starts, the data processing unit 21 refers to the setting information storage unit 23 a and determines the operation mode (step S100 ).

[0049] When the operation mode determined in step S100 is the normal mode or the burst mode 1, the data processing unit 21 performs the processing after step S105. Specifically, the data processing unit 21 performs the processing at each predetermined sampling cycle. Therefore, the data processing unit 21 waits until the processing timing of each sampling cycle arrives (step S105).

[0050] When the processing opportunity comes, the data processing unit 21 performs acquisition of physical quantities, filtering, and temperature correction (step S110). That is, the data processing unit 21 acquires digital data output from each sensor and performs the above-mentioned prescribed processing on the digital data. After completing the above-mentioned prescribed processing, the data processing unit 21 enables the data ready signal to the data ready pin (step S115). As a result, the host 30 is notified that any physical quantity can be acquired.

[0051] The host 30 can send any command to the sensor device 10. When receiving any command, the command processing unit 22 analyzes the command, and the data processing unit 21 performs processing according to the command (step S120). The data processing unit 21 can perform processing corresponding to any command, but here, the burst mode 1 is described for comparison with the burst mode 2.

[0052] Figure 3 is a timing diagram for explaining the processing in burst mode 1. Figure 3In FIG. 1 , the timing of executing the specified processing, the preparation status of sending data, the status of the data ready pin, the status of the chip select terminal CS, the clock terminal SCLK, the data input terminal SDI, and the data output terminal SDO in SPI communication are shown. The data processing unit 21 performs the specified processing at a ratio of one sampling period Tsamp. Figure 3 , an example is shown in which the prescribed processing in step S110 is performed from time t1 to time t2.

[0053] exist Figure 3 In the example shown, a data ready signal is output at time t2, enabling the data ready pin. Figure 3 In the example shown, in response to the enablement of the data ready signal, the host 30 performs continuous transfer in burst mode 1. In order to perform the continuous transfer, the host 30 sets the chip select terminal CS of the sensor device 10 to be active (in this example, the low level is active). Then, the host 30 outputs a clock signal to the clock terminal SCLK during the period tcom, and outputs a command (in this example, 0x8000) to the data input terminal SDI in synchronization with the clock signal to instruct the execution of the continuous transfer.

[0054] The command processing unit 22 analyzes the command and determines that the command is a command to instruct the execution of continuous transmission, that is, a command to instruct the execution of burst mode 1. As a result, the data processing unit 21 performs continuous transmission in burst mode 1. Therefore, the data processing unit 21 refers to the setting information storage unit 23a to determine the physical quantity to be transmitted. Here, as described above, the angular velocities Gx, Gy, Gz, and the accelerations Ax, Ay, and Az are the physical quantities to be transmitted.

[0055] The data processing unit 21 stores the transmission data of a total of 6 words representing these angular velocities Gx, Gy, Gz, accelerations Ax, Ay, Az in the transmission buffer 23b in the transmission order. The order in which the transmission data is sent is predetermined, and when the transmission data is stored in the transmission buffer 23b in the transmission order, the data of the words with an earlier transmission order are transferred to the transmission register 24a in sequence. If the shift register 24c is empty, the transmission data transferred to the transmission register 24a is transferred to the shift register 24c. When the transmission data initially sent is stored in the transmission register 24a, the transmission data is in a state where it can be sent. Figure 3 , a state in which the transmission can be performed at time t3 is illustrated.

[0056] When the state becomes ready for transmission of transmission data, continuous transmission of transmission data starts after a predetermined standby period. Figure 3In the example shown, the standby period from the completion of the transmission of the command instructing the execution of the continuous transfer to the start of the transmission of the transmission data is represented as the first standby period t STALL1 . Specifically, after the first standby period, the host 30 outputs a clock signal to the clock terminal SCLK. The shift register 24c outputs the transmission data of one word currently stored from the data output terminal SDO to the host 30 in synchronization with the clock signal. As a result, the host 30 reads the transmission data in synchronization with the clock signal. In addition, when the burst mode 1 starts, the command analysis is not performed until the burst mode 1 ends. That is, from the perspective of the sensor device 10, the data output from the host 30 to the data input terminal SDI becomes irrelevant. Therefore, in the burst mode 1, the host 30 only needs to output arbitrary data, such as dummy data, to the data input terminal SDI.

[0057] exist Figure 3 In the example, it is assumed that the transmission is carried out in the order of angular velocity Gx, Gy, Gz, acceleration Ax, Ay, Az. Therefore, the first transmitted data of one word is data representing angular velocity Gx, and the next transmitted data of one word is data representing angular velocity Gy. Figure 3 In FIG. 1 , a part is omitted and the angular velocity Gx, Gy, Gz, and the acceleration Ax, Ay, Az are transmitted in the order shown. Figure 3 In the example, the period from the start of a word transmission to the start of the next word transmission is expressed as the read rate t READRATE In addition, Figure 3 In the example, the period from the end of the transmission of a certain word to the start of the transmission of the next word is represented as the second standby period t STALL2 .

[0058] When the transmission data representing the acceleration Az as the last word is transmitted to the host 30, the burst mode 1 ends and the voltage level of the chip select terminal CS becomes inactive. Then, when the sampling period Tsamp elapses, the burst mode 1 starts again. Figure 3 As described above, in burst mode 1, from the completion of the predetermined processing to the start of data transmission, a period tcom for receiving a command instructing execution of continuous transmission and a subsequent first standby period t STALL1 Therefore, in this embodiment, a burst mode 2 is provided to shorten these periods as much as possible.

[0059] When the operation mode determined in step S100 is the burst mode 2, the data processing unit 21 executes the processes in step S205 and thereafter. Figure 4 is a timing diagram for explaining the processing in burst mode 2. Figure 4 Shown in Figure 3The same applies to the states of the terminals, etc. In the burst mode 2 , the data processing unit 21 also performs a predetermined process at a rate of one sampling period Tsamp.

[0060] Steps S205 and S210 in burst mode 2 are the same processing as steps S105 and S110. Figure 4 , an example is shown in which the prescribed processing in step S210 is performed until time t4 to time t5. That is, when the processing opportunity comes, the data processing unit 21 acquires the physical quantity, performs filtering processing, and performs temperature correction (step S210). In burst mode 2, the data processing unit 21 performs transmission preparation of the transmission data group before enabling data ready.

[0061] Therefore, first, the data processing unit 21 causes the transmission buffer 23b to store a predetermined amount of transmission data groups (step S215). Specifically, the data processing unit 21 refers to the setting information storage unit 23a to determine the physical quantity to be transmitted. Here, as described above, the angular velocities Gx, Gy, Gz, and the accelerations Ax, Ay, and Az are the physical quantities to be transmitted. The data processing unit 21 sorts the transmission data representing the angular velocities Gx, Gy, Gz, and the accelerations Ax, Ay, and Az, which are a total of 6 words, in the transmission order and stores them in the transmission buffer 23b.

[0062] Next, the data processing unit 21 initializes the variable n, which is a variable indicating the word to be transmitted, to 0 (step S220), and causes the transmission register 24a to store the transmission data of the word to be transmitted nth (hereinafter referred to as word (n)) (step S225). In the present embodiment, when any transmission data is stored in the transmission register 24a, if the shift register 24c is empty, the transmission data is transferred to the shift register 24c. Therefore, when the transmission data of word (1) is stored in the transmission register 24a, the transmission data of word (1) is immediately transferred to the shift register 24c, and the shift register 24c is in a state where word (1) is stored.

[0063] Next, the data processing unit 21 increments the variable n (step S230). Furthermore, the data processing unit 21 enables data ready for the data ready pin (step S235). That is, when the transmission data to be initially sent is stored in the transmission register 24a, data ready is enabled. However, when the transmission data to be initially sent is stored in the transmission register 24a, the transmission data is immediately transferred to the shift register 24c, so when the transmission data to be initially sent is stored in the shift register 24c, data ready can also be considered to be enabled. In short, by enabling, the host 30 is notified that the transmission data can be sent. As described above, in burst mode 2, the data processing unit 21 does not receive a command indicating the execution of continuous transmission from the host 30, but prepares to send a data group. Then, when the transmission data to be initially sent is stored in the transmission register 24a, the data processing unit 21 regards that the preparation of the transmission data group is complete and enables data ready. In Figure 4 In the example shown, an example is shown in which a signal indicating DataReady is output at time t6 and the data ready pin is enabled.

[0064] Next, the data processing unit 21 waits until it determines that the transmission register 24a is empty (step S240). When it is determined that the transmission register 24a is empty, the data processing unit 21 causes the transmission register 24a to store word (n) (step S245). Furthermore, the data processing unit 21 increments the variable n (step S250) and determines whether the variable n is consistent with the maximum value N (step S255). In step S255, when it is determined that the variable n is inconsistent with the maximum value N, the data processing unit 21 repeats the processing after step S240.

[0065] On the other hand, in step S255, when it is determined that the variable n is consistent with the maximum value N, the data processing unit 21 invalidates the data ready at the data ready pin (step S260). As a result, the host 30 is notified that the preparation of the transmission data representing the physical quantity detected in the next sampling cycle is not completed. Figure 4 In the example shown, an example is shown in which a signal indicating data ready DataReady is not output at time t7 and the data ready pin is invalidated.

[0066] When the data ready pin is enabled in step S235, the host 30 starts continuous transmission with the enable as a trigger. That is, the host 30 sets the chip select terminal CS of the sensor device 10 to be active (low level in this example). Then, the host 30 outputs a clock signal to the clock terminal SCLK, and outputs a dummy command to the data input terminal SDI in synchronization with the clock signal (in Figure 4 0x0000 in the example shown).

[0067] The shift register 24c outputs the transmission data of one word currently stored from the data output terminal SDO to the host 30 in synchronization with the clock signal. As a result, the host 30 reads the transmission data in synchronization with the clock signal. In addition, when the burst mode 2 starts, the command processing unit 22 does not accept any command other than the sampling stop command. Therefore, during the execution of the burst mode 2, the command processing unit 22 and the data processing unit 21 do not need to perform other processing related to the burst mode 2. Therefore, the burst mode 2 can be realized by simple processing, and there is no need to make the period from the end of the transmission of a certain word to the start of the transmission of the next word, that is, the standby period t STALL Too long.

[0068] exist Figure 4 In the example, it is assumed that the angular velocity Gx, Gy, Gz and the acceleration Ax, Ay, Az are transmitted in the order. Therefore, the first transmitted word (1) is the data representing the angular velocity Gx, and the next transmitted word (2) is the data representing the angular velocity Gy. Figure 4 In FIG. 1 , a part is omitted and the transmission is performed in the order of angular velocity Gx, Gy, Gz and acceleration Ax, Ay, Az.

[0069] In this example, when the transmission data of word (1) is stored in the transmission register 24a in step S225, and data ready is enabled in step S235, the transmission data of word (1) is immediately transferred to the shift register 24c. Therefore, in this case, in step S240, it is determined that the transmission register 24a is empty, and in step S245, the transmission data of word (2) is stored in the transmission register 24a. As a result, the transmission data of word (1) is stored in the shift register 24c, and the transmission data of word (2) is stored in the transmission register 24a.

[0070] In parallel with this process, the host 30 outputs a clock signal to the clock terminal SCLK in response to the enabling of data ready in step S235. Meanwhile, the shift register 24c transmits the transmission data of word (1), that is, the transmission data indicating the angular velocity Gx, to the host 30 in synchronization with the clock signal.

[0071] When the transmission data of word (1) is transmitted to the host 30, the shift register 24c becomes empty, so the transmission data of word (2) stored in the transmission register 24a is transferred to the shift register 24c. As a result, it is determined in step S240 that the transmission register 24a is empty, and in step S245, the transmission data of word (3) is stored in the transmission register 24a. As a result, the transmission data of word (2) is stored in the shift register 24c, and the transmission data of word (3) is stored in the transmission register 24a.

[0072] When the host 30 receives the transmission data of word (1), after the waiting period t STALL , and outputs a clock signal to the clock terminal SCLK again. The shift register 24c transmits the transmission data of word (2), i.e., the transmission data indicating the angular velocity Gy, to the host 30 in synchronization with the clock signal. Thereafter, by repeating the same process, the angular velocity Gz, the acceleration Ax, Ay, and Az are continuously transmitted in the order.

[0073] As described above, in this embodiment, the command processing unit 22 does not accept commands other than the sampling stop command in the burst mode 2. When the command processing unit 22 accepts the sampling stop command, the command processing unit 22 notifies the data processing unit 21 of the acceptance of the sampling stop command. In this case, the data processing unit 21 performs an interrupt process to stop the sampling process in the burst mode 2.

[0074] Figure 5 2 is a timing chart for explaining the process of stopping the burst mode 2. Figure 5 In the figure, it is shown that Figure 4 The same terminal status, etc. Figure 5 , an example is shown in which a sampling stop command (0x8302 in this example) is output from the host 30 immediately after data ready is enabled at time t10.

[0075] Even when the sampling stop command is output, a clock signal for transmitting the stop command is output from the host 30. Therefore, the transmission data to be transmitted first is transmitted from the shift register 24c to the host 30 in synchronization with the clock signal.

[0076] However, the command processing unit 22 analyzes the command in parallel with the transmission of the transmission data and determines that the command is a sampling stop command. In this case, the command processing unit 22 instructs the data processing unit 21 to execute a process for stopping the sampling process. As a result, the data processing unit 21 interrupts the sampling process. Figure 2 The processing shown in the figure deletes the transmission data stored in the transmission buffer 23b, the transmission register 24a, and the shift register 24c. In addition, in order to stop sampling, the host 30 does not output the clock signal when the transmission data of the next word is transmitted. As a result, the data transmission from the sensor device 10 to the host 30 is stopped.

[0077] In the present embodiment, the sensor device 10 changes to the configuration mode when receiving the sampling stop command. As a result, the command processing unit 22 can accept any command, and the data processing unit 21 becomes in a state of executing processing corresponding to the received command. According to the above structure, the sampling in the burst mode 2 can be easily stopped. In addition, after the sampling is stopped, various functions of the sensor device 10 can be used. In addition, in the case of continuous transmission based on the burst mode 2, the sensor device 10 can be changed to the sampling mode in the state where the action mode is set to the burst mode 2 according to the setting information.

[0078] (3) Other implementation methods, etc.

[0079] The above-mentioned embodiment is an example for implementing the present invention, and various other embodiments can be adopted. For example, the timing of invalidating the data ready pin can be various timings. That is, as long as the data ready pin is enabled and the continuous transmission to the host 30 starts, the data ready pin can be invalidated at any timing. However, if the burst mode 2 is not stopped, the burst mode 2 continues even when it is invalidated.

[0080] Sensor devices can be used for various purposes and can also be used in various electronic devices, vehicle-mounted devices, etc. As vehicle-mounted devices, various navigation devices, automatic driving control devices, etc. can be listed. In addition, it can also be used as a positioning device for locating the position of the vehicle.

[0081] Furthermore, various actions can be listed as actions when a sampling stop command is received during the execution of burst mode 2. In the above embodiment, transmission is stopped from the next word of the word output when the sampling stop command is received, but the present invention is not limited to this method. For example, in a configuration in which sampling is performed at a predetermined cycle, sampling after at least the next sampling cycle may be stopped when a sampling stop command is received.

[0082] According to this structure, the detection of the physical quantity is not performed after the next sampling cycle. Therefore, no matter at what time the transmission of the transmission data representing the physical quantity is stopped, at least the transmission of the physical quantity after the next sampling cycle is not performed. According to this structure, no matter what processing is performed in the data processing unit 21, the detection of the physical quantity and the data transmission can be reliably stopped after the next sampling cycle. Of course, even if the sampling after the next sampling cycle is stopped, the sampling can be started again according to the instruction from the host 30, for example.

[0083] In addition, it is also possible to be configured to stop at least the sending of the transmission data group after the next sampling period when the sampling stop command is received. For example, it is also possible to stop sending after the next sampling period after all the N words set as the sending object are sent to the host 30. In addition, it is also possible to stop the sending of the remaining words after a part of the N words as the sending object is sent. According to this structure, whether there is sampling or not, the sending of the transmission data can be stopped in response to the sampling stop command. Of course, even if the sending of the transmission data group after the next sampling period is stopped, for example, the sending of the transmission data group can be started again according to the instruction from the host 30.

[0084] Furthermore, although in the above-mentioned embodiment, the sensor device 10 does not accept commands other than the sampling stop command in the burst mode 2, it may accept limited commands including the sampling stop command. The limited command is a command that has no effect on the continuous transmission in the burst mode 2, and preferably is a command that can be applied in the execution of the burst mode 2. As such a command, for example, a command for outputting an arbitrary signal from a general-purpose pin, a command for writing arbitrary information to the RAM 23, etc. can be listed. According to this structure, in the execution of the burst mode 2, in the sensor device 10, other functions other than the continuous transmission can be executed.

[0085] Clock synchronous communication can be any communication that transmits data from the sensor device to the host in synchronization with the clock, and can also be communication based on a communication standard other than SPI. Burst mode can be any mode that performs continuous data transmission. As in the above embodiment, two burst modes can be selected, or one or more than three burst modes can be selected. Modes other than burst mode are not limited to normal mode and configuration mode, and various modes can be set.

[0086] The burst mode can be any mode as long as the number of commands for sending data per unit is less than that in the normal mode. That is, in the burst mode, unlike the transmission method of the normal mode in which one read unit of data is transmitted in response to one command, the number of commands required to read one read unit of data is less than that in the normal mode. For example, in the above-mentioned embodiment, in burst mode 2, multiple copies of data of the read unit are continuously transmitted without a read command, and in burst mode 1, multiple copies of data of the read unit are continuously transmitted in response to one read command. Therefore, less than one command is required for the transmission of one read unit of data. This means that in the burst mode, continuous transmission can be achieved with fewer commands than in the normal mode. In addition, in the above-mentioned embodiment, the read unit is 1 word, that is, 16 bits, but this read unit is an example and can also be other data amounts.

[0087] The detection object of the sensor device is not limited to the angular velocity, acceleration, and temperature as described above, and can be a part of them or include other physical quantities. Of course, it can also be a sensor device that uses other physical quantities as detection objects. Examples of physical quantities include angular acceleration, velocity, distance, pressure, sound pressure, or magnetic quantity.

[0088] The specified amount of transmission data groups only needs to be data of a predetermined amount. Therefore, in the structure in which sampling is performed at a specified sampling period as in the above-mentioned embodiment, in addition to the structure in which the detection result detected in one sampling becomes the transmission data group, various structures can also be adopted. For example, a predetermined amount (50%) of the detection result detected in one sampling can also become the transmission data group of the specified amount, and the detection result detected in more than two samplings can also become the transmission data group of the specified amount. That is, the transmission data group of the specified amount can change according to the sampling period, the capacity of the transmission buffer, etc.

[0089] Preparation of a transmission data group refers to setting a predetermined amount of transmission data groups to a state in which they can be transmitted continuously. Therefore, when a clock signal is output from the host 30 after the preparation of the transmission data group is completed, the transmission data of the read unit amount is immediately transmitted, and the remaining transmission data is also in a state in which they can be transmitted sequentially.

[0090] The notification of data ready to the host can be implemented in a manner that allows the host to recognize that the preparation for sending the data group is complete, and is not limited to the structure of notifying through a dedicated pin for indicating data ready. For example, a general-purpose pin may be used.

[0091] The continuous transmission of the transmission data group can be realized by transmitting multiple copies of the data of the read unit synchronously with the clock. Therefore, in the case of continuous transmission, as in the above-mentioned embodiment, the transmission of each read unit can be continuously performed, or multiple read units can be aggregated and continuously transmitted. In the latter case, the waiting time between the transmission of a certain read unit and the transmission of the next read unit can be reduced.

Claims

1. A transmission method, characterized in that: Transmit data from the sensor device to the host through clock-synchronized communication, In burst mode for continuous data transmission, the sensor device without accepting a command instructing execution of the continuous transmission, but preparing a prescribed amount of transmission data groups based on the detection result of the sensor device, When the preparation for sending the data group is completed, the host is notified that the data is ready. The transmission data group is continuously outputted in synchronization with a transmission clock to the host which starts reading in response to the data being ready.

2. The transmission method according to claim 1, wherein: In the burst mode, the sensor device Sampling is performed at a prescribed period and the detection result is obtained, When the command to stop the sampling is received, the sampling is stopped at least after the next sampling cycle.

3. The transmission method according to claim 1, wherein: In the burst mode, the sensor device Sampling is performed at a prescribed period and the detection result is obtained, When the sampling stop command is received, the transmission of the transmission data group is stopped at least after the next sampling cycle.

4. The transmission method according to claim 1, wherein: In the burst mode, the sensor device Commands other than the limited commands including the sampling stop command are not accepted.

5. The transmission method according to claim 4, wherein: The sensor device When the sampling stop command is received, an arbitrary command is received.

6. A sensor device, characterized in that: Transmit data to the host through clock synchronous communication, The sensor device comprises: Sensor elements, detecting physical quantities; A data-ready pin, indicating readiness to send a data group; and Data processing circuits, In the burst mode for continuous data transmission, the data processing circuit without accepting a command instructing execution of the continuous transmission, but preparing a prescribed amount of the transmission data set based on the detection result of the sensor element, When the preparation for sending the data group is made, data ready is enabled at the data ready pin, The transmission data group is continuously outputted in synchronization with a transmission clock to the host which starts reading in response to the data being ready.