CN-122018935-A - Gyroscope parameter writing method, system and device
Abstract
The invention discloses a method, a system and a device for writing parameters of a gyroscope, which are based on the cooperation of a processor and a volatile memory and a nonvolatile memory in the gyroscope, can realize batch non-permanent writing and permanent writing, and the output of the gyroscope corresponding to the non-permanent writing can be sent to an interactive device side for evaluation, thereby facilitating parameter adjustment, and remarkably improving the production efficiency compared with the traditional writing method.
Inventors
- ZHANG CHENLIANG
- LI XIAOFENG
- ZHENG MENGJUAN
Assignees
- 中国兵器工业集团第二一四研究所苏州研发中心
Dates
- Publication Date
- 20260512
- Application Date
- 20260106
Claims (10)
- 1. A method of writing gyroscope parameters, the method being implemented in a processor disposed between a gyroscope and an interaction device, the method comprising: If a first configuration instruction sent by the interaction device is received, batch configuration parameters sent by the interaction device are received, the batch configuration parameters are temporarily stored in a FLASH of the interaction device according to a preset format, after a configuration ending instruction is received, the batch configuration parameters in the FLASH of the interaction device are written into EEPROMs of corresponding batch gyroscopes, and the gyroscope output written with the configuration parameters is transmitted to the interaction device, wherein the first configuration instruction indicates that the writing is non-permanent writing; If a second configuration instruction sent by the interaction device is received, batch configuration parameters sent by the interaction device are received, the batch configuration parameters are temporarily stored in a RAM of the interaction device according to a preset format, after a configuration ending instruction is received, the preset configuration parameters in the RAM of the interaction device are written into OTPs of corresponding batch gyroscopes, and the gyroscope output written with the configuration parameters is transmitted to the interaction device, wherein the second configuration instruction indicates that the writing is permanent writing.
- 2. The method according to claim 1, further comprising, if a first configuration instruction sent by the interaction device is received and a non-batch configuration parameter sent by the interaction device is received, temporarily storing the non-batch configuration parameter in a self-FLASH according to a preset format, writing the non-batch configuration parameter in the self-FLASH into an EEPROM of a corresponding non-batch gyroscope after receiving a configuration end instruction, and transmitting the gyroscope output written with the configuration parameter to the interaction device; And if a second configuration instruction sent by the interaction device is received, and non-batch configuration parameters sent by the interaction device are received, the non-batch configuration parameters are temporarily stored in a self-RAM according to a preset format, after a configuration ending instruction is received, the non-batch configuration parameters in the self-RAM are written into OTPs of corresponding non-batch gyroscopes, and the gyroscope output written with the configuration parameters is transmitted to the interaction device.
- 3. The method of claim 1 or 2, wherein the configuration parameters arranged in the predetermined format are sequentially an initiator, and write parameters of a plurality of gyroscope chips arranged in a chip sequence number, wherein the initiator comprises a non-permanent write identifier or a permanent write identifier and a sequence number of a start chip, and the start chip is the first gyroscope chip.
- 4. The method according to claim 1 or 2, wherein after writing the configuration parameters, the flag bit in the own FLASH is updated, wherein if the non-permanent writing is performed, the flag bit is updated to be a first flag bit; The method further comprises the steps of detecting a flag bit in the FLASH of the user after restarting if the power-off restarting condition exists, writing configuration parameters in the FLASH of the user before power-off into an EEPROM of a corresponding gyroscope and transmitting data output by the gyroscope to the interaction device if the flag bit is a first flag bit, and directly transmitting the data output by the gyroscope to the interaction device if the flag bit is a second flag bit.
- 5. A system for writing parameters of a gyroscope, the system being carried in a processor disposed between the gyroscope and an interaction device, the system comprising: The first batch writing module temporarily stores batch configuration parameters in a FLASH of the first batch writing module according to a preset format if a first configuration instruction sent by the interaction device is received and batch configuration parameters sent by the interaction device are received, writes the batch configuration parameters in the FLASH of the first batch writing module into EEPROMs of corresponding batch gyroscopes after receiving a configuration ending instruction, and transmits gyroscope output written with the configuration parameters to the interaction device, wherein the first configuration instruction indicates that the writing is non-permanent writing; And the second batch writing module is used for temporarily storing the batch configuration parameters in the RAM according to a preset format if a second configuration instruction sent by the interaction device is received and batch configuration parameters sent by the interaction device are received, writing the preset configuration parameters in the RAM into OTP of the corresponding batch gyroscope after receiving the configuration ending instruction, and transmitting the gyroscope output written with the configuration parameters to the interaction device, wherein the second configuration instruction indicates that the writing is permanent writing.
- 6. The system of claim 5, wherein the system further comprises: The first non-batch writing module is used for temporarily storing the non-batch configuration parameters in the FLASH of the first non-batch writing module according to a preset format if a first configuration instruction sent by the interaction device is received and the non-batch configuration parameters sent by the interaction device are received, writing the non-batch configuration parameters in the FLASH of the first non-batch writing module into EEPROMs of corresponding non-batch gyroscopes after receiving a configuration ending instruction, and transmitting the gyroscope output written with the configuration parameters to the interaction device; And the second non-batch writing module is used for temporarily storing the non-batch configuration parameters in the RAM according to a preset format if a second configuration instruction sent by the interaction device is received and the non-batch configuration parameters sent by the interaction device are received, writing the non-batch configuration parameters in the RAM into OTPs of corresponding non-batch gyroscopes after receiving a configuration ending instruction, and transmitting the gyroscope output written with the configuration parameters to the interaction device.
- 7. The system of claim 5 or 6, wherein the configuration parameters arranged in the predetermined format are sequentially an initiator, and the write parameters of the plurality of gyroscope chips arranged in the sequence of chip numbers, wherein the initiator comprises a non-permanent write identifier or a permanent write identifier and the sequence number of an initiator chip, and the initiator chip is the first gyroscope chip.
- 8. The system of claim 5 or 6, wherein after the configuration parameters are written, the flag bit in the FLASH is updated, wherein if the non-permanent writing is performed, the flag bit is updated to be a first flag bit; The system further comprises a power-off restarting module, wherein the power-off restarting module detects a flag bit in the FLASH of the system after restarting if the power-off restarting condition exists, writes configuration parameters in the FLASH of the system before power-off into an EEPROM of a corresponding gyroscope and transmits data output by the gyroscope to the interaction device if the flag bit is a first flag bit, and directly transmits the data output by the gyroscope to the interaction device if the flag bit is a second flag bit.
- 9. A gyroscope parameter writing device is characterized by comprising a processor and an interaction device, wherein the interaction device is connected with a plurality of gyroscopes through the processor, and the processor writes parameters by adopting the method according to any one of claims 1-4.
- 10. The apparatus of claim 9, wherein the processor is an STM32, the STM32 being coupled to the gyroscope via an SPI bus and being coupled to the interaction device via a serial bus.
Description
Gyroscope parameter writing method, system and device Technical Field The invention relates to a gyroscope parameter writing method, a gyroscope parameter writing system and a gyroscope parameter writing device, and belongs to the technical field of micro-electromechanical system sensing. Background The MEMS gyroscope is widely applied in the fields of inertial navigation, gesture detection and the like, and in a test link in actual chip manufacture, an optimal parameter configuration scheme is determined by comprehensively and deeply evaluating various performance indexes of a chip, and finally, optimal parameters are written into the gyroscope chip. The conventional writing method generally needs to be connected and programmed one by one, has low efficiency and is inconvenient for mass production. Disclosure of Invention The invention provides a gyroscope parameter writing method, a gyroscope parameter writing system and a gyroscope parameter writing device, which solve the problems disclosed in the background technology. According to one aspect of the present application, there is provided a method of writing gyroscope parameters, the method being implemented within a processor disposed between a gyroscope and an interaction device, the method comprising: If a first configuration instruction sent by the interaction device is received, batch configuration parameters sent by the interaction device are received, the batch configuration parameters are temporarily stored in a FLASH of the interaction device according to a preset format, after a configuration ending instruction is received, the batch configuration parameters in the FLASH of the interaction device are written into EEPROMs of corresponding batch gyroscopes, and the gyroscope output written with the configuration parameters is transmitted to the interaction device, wherein the first configuration instruction indicates that the writing is non-permanent writing; If a second configuration instruction sent by the interaction device is received, batch configuration parameters sent by the interaction device are received, the batch configuration parameters are temporarily stored in a RAM of the interaction device according to a preset format, after a configuration ending instruction is received, the preset configuration parameters in the RAM of the interaction device are written into OTPs of corresponding batch gyroscopes, and the gyroscope output written with the configuration parameters is transmitted to the interaction device, wherein the second configuration instruction indicates that the writing is permanent writing. Further, if a first configuration instruction sent by the interaction device is received and non-batch configuration parameters sent by the interaction device are received, the non-batch configuration parameters are temporarily stored in a FLASH of the interaction device according to a preset format, after the configuration ending instruction is received, the non-batch configuration parameters in the FLASH of the interaction device are written into EEPROMs of corresponding non-batch gyroscopes, and the gyroscope output written with the configuration parameters is transmitted to the interaction device; And if a second configuration instruction sent by the interaction device is received, and non-batch configuration parameters sent by the interaction device are received, the non-batch configuration parameters are temporarily stored in a self-RAM according to a preset format, after a configuration ending instruction is received, the non-batch configuration parameters in the self-RAM are written into OTPs of corresponding non-batch gyroscopes, and the gyroscope output written with the configuration parameters is transmitted to the interaction device. Further, the configuration parameters arranged according to the preset format are sequentially an initiator and write-in parameters of a plurality of gyroscope chips arranged according to chip serial numbers, wherein the initiator comprises a non-permanent write-in identifier or a permanent write-in identifier and serial numbers of initial chips which are arranged in sequence, and the initial chips are gyroscope chips arranged at the first. Further, after the configuration parameters are written, the flag bit in the FLASH is updated, wherein if the non-permanent writing is carried out, the flag bit is updated to be a first flag bit, and if the permanent writing is carried out, the flag bit is updated to be a second flag bit; The method further comprises the steps of detecting a flag bit in the FLASH of the user after restarting if the power-off restarting condition exists, writing configuration parameters in the FLASH of the user before power-off into an EEPROM of a corresponding gyroscope and transmitting data output by the gyroscope to the interaction device if the flag bit is a first flag bit, and directly transmitting the data output by the gyroscope to the interaction device if the flag bi