System management method and device of embedded equipment, electronic equipment and storage medium

By entering the shutdown mode when the microprocessor system of the wearable embedded device is idle and periodically wake-up is used to solve the problem of high standby power consumption of MCU, and the effect of low power consumption and long-term operation is achieved.

CN119493605AActive Publication Date: 2025-02-21KINGSIGNAL TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411558104.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-21
Estimated Expiration
2044-11-04

AI Technical Summary

Technical Problem

The MCU has a high standby power consumption in existing wearable embedded high-precision positioning devices, which is difficult to meet the needs of long-term operation.

Method used

When the microprocessor system is idle, it turns off hardware except the RTC clock, periodically wakes up through the RTC clock, writes motion data to the backup register, and updates the environment data of the static random access memory.

Benefits of technology

Minimize device power consumption to ensure embedded devices meet the needs of low power consumption and long-term operation when battery power is limited.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493605A_ABST
    Figure CN119493605A_ABST
Patent Text Reader

Abstract

The invention provides a system management method for embedded equipment, which comprises the following steps: when detecting that a microprocessor system is idle, determining whether to enter a closed mode, the closed mode being used for closing hardware except an RTC (Real Time Clock) in the microprocessor, and the closed mode being periodically awakened through the RTC; when the microprocessor system enters the closed mode, writing motion data into a backup register of the microprocessor when the microprocessor system enters the closed mode; when the microprocessor system is awakened from the off mode, environmental data in the static random access memory is updated based on the motion data in the backup register, the environmental data being used to support operation of the microprocessor system. According to the method, the RTC clock is used for periodically waking up the equipment to enter the closed mode, processing and detecting events and initiating a positioning process, so that the power consumption of the equipment is reduced to the greatest extent under the condition that the electric quantity of a battery of the embedded equipment is limited, and the requirements of low power consumption and long-time operation of a microprocessor system are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embedded devices, and in particular to a system management method, device, electronic device and storage medium for embedded devices. Background Art

[0002] In the current wearable embedded high-precision positioning devices, the solution of communication module plus MCU plus pedometer module is adopted. The communication module implements the air interface high-precision positioning process, and the MCU implements motion perception, module control, low power management, charging management, power on / off control, etc. The pedometer module is used to sense the user's moving speed and count steps. The MCU determines the user's position change through the pedometer function of the pedometer module and controls the module to initiate the air interface positioning process.

[0003] The key to wearable devices is low power consumption. The traditional real-time operating system ROS of MCU provides the Sleep Mode operation mode, that is, when the system is idle, the system runs in Sleep Mode. When an event arrives, the system wakes up from Sleep Mode to process events and tasks. Sleep Mode stops the CPU in the MCU, puts the device in a low-power mode, and reduces the energy consumption of the device. However, in Sleep Mode, most of the peripherals in the MCU are still in working mode (including SRAM, Flash, etc.), and continue to consume battery energy. It can also be known from the MCU Datasheet that the current consumption of the MCU in Sleep Mode is still at the mA level, which is difficult to meet the continuous working time requirements of wearable devices. For example, if the device is equipped with a 1000mA battery, it is required to work continuously for 6 months after charging once. In theory, the average working current is required to be 230uA. It can be seen that the standby power consumption of the existing MCU is relatively high. Therefore, reducing the standby power consumption of the MCU in wearable devices is an urgent problem to be solved. Summary of the invention

[0004] The embodiment of the present invention provides a system management method for an embedded device, aiming to solve the problem of how to reduce the standby power consumption of the MCU in a wearable device. When the microprocessor system is detected to be idle, the system can enter a shutdown mode, which is used to shut down the hardware in the microprocessor except the RTC clock. The shutdown mode is periodically awakened by the RTC clock, which can reduce the power consumption of the device to the greatest extent. Through the function of the RTC clock, the device is periodically awakened, events are processed and detected, and a positioning process is initiated, so as to ensure that the embedded device meets the requirements of low power consumption and long-term operation of the microprocessor system when the battery power is limited.

[0005] In a first aspect, an embodiment of the present invention provides a system management method for an embedded device, wherein the embedded device includes a communication module, a pedometer module and a microprocessor, wherein the communication module is used for an air interface positioning process to obtain positioning data, the pedometer module is used to obtain step data, and the microprocessor is used to determine a user position change according to the step data, and control the communication module to initiate the air interface positioning process. The system management method for the embedded device is applied to the microprocessor, and the microprocessor includes a backup register and a static random access memory. The method includes the following steps:

[0006] When the microprocessor system is detected to be idle, determining whether to enter a shutdown mode, wherein the shutdown mode is used to shut down hardware in the microprocessor except for the RTC clock, and the shutdown mode is periodically awakened by the RTC clock;

[0007] When the microprocessor system enters the shutdown mode, writing the motion data when the microprocessor system enters the shutdown mode into the backup register of the microprocessor;

[0008] When the microprocessor system wakes up from the shutdown mode, the environmental data in the static random access memory is updated based on the motion data in the backup register, and the environmental data is used to support the operation of the microprocessor system.

[0009] Optionally, the shutdown mode is periodically awakened by the RTC clock, including:

[0010] Initializing the RTC clock;

[0011] After the RTC clock is initialized, the motion data in the backup register is restored to the environment data in the static random access memory.

[0012] Optionally, the initializing the RTC clock includes:

[0013] Setting the initial date and cycle time of the RTC clock;

[0014] Determining that the wake-up mode of the microprocessor system is a wake-up start or a reset start, in which the pedometer module has been initialized, and in which the pedometer module has not been initialized;

[0015] If it is determined that the wake-up mode of the microprocessor system is wake-up start, then determining that the RTC clock initialization is completed;

[0016] If it is determined that the wake-up mode of the microprocessor system is reset start, the pedometer module is initialized, and after the pedometer module is initialized, it is determined that the RTC clock initialization is completed.

[0017] Optionally, the initializing the pedometer module includes:

[0018] Reset the pedometer module to put the pedometer module in standby mode, set the pedometer parameters of the pedometer module, turn on the pedometer function of the pedometer module to put the pedometer module in running mode, and complete the initialization of the pedometer module.

[0019] Optionally, after the microprocessor system wakes up from the shutdown mode, the method further includes:

[0020] Obtaining a current trusted timestamp from the RTC clock, and obtaining current step count data from the pedometer module;

[0021] Determining whether it is necessary to control the communication module to initiate the air interface positioning process;

[0022] If it is determined that the communication module needs to be controlled to initiate the air interface positioning process, the current trusted timestamp and the current step count data are updated to the environmental data of the static random access memory.

[0023] Optionally, the determining whether it is necessary to control the communication module to initiate the air interface positioning process includes:

[0024] Acquire the step count data of the last positioning or the trusted timestamp of the last positioning from the environmental data in the static random access memory;

[0025] If the step difference between the current step data and the step data of the last positioning is greater than the step threshold required for positioning, it is determined that the communication module needs to be controlled to initiate the air interface positioning process;

[0026] If, the time difference between the current trusted timestamp and the trusted timestamp of the last positioning is greater than the time threshold required for positioning, it is determined that the communication module needs to be controlled to initiate the air interface positioning process.

[0027] Optionally, the microprocessor system entering the shutdown mode includes:

[0028] Synchronize the system log information of the microprocessor system to the Flash storage device of the microprocessor;

[0029] Disable the wake-up function of the RTC clock;

[0030] Clear the wake-up flag of the RTC clock;

[0031] Enabling the wake-up function of the RTC clock;

[0032] Enter the shutdown mode.

[0033] In a second aspect, an embodiment of the present invention further provides a system management device for an embedded device, wherein the embedded device includes a communication module, a pedometer module and a microprocessor, wherein the communication module is used for an air interface positioning process to obtain positioning data, the pedometer module is used to obtain step data, and the microprocessor is used to determine a user position change according to the step data, and control the communication module to initiate the air interface positioning process. The system management method of the embedded device is applied to the microprocessor, and the microprocessor includes a backup register and a static random access memory. The system management device of the embedded device includes:

[0034] A detection module, used to determine whether to enter a shutdown mode when detecting that the microprocessor system is idle, wherein the shutdown mode is used to shut down the hardware in the microprocessor except the RTC clock, and the shutdown mode is periodically awakened by the RTC clock;

[0035] A writing module, used for writing the motion data of the microprocessor system when entering the shutdown mode into the backup register of the microprocessor when the microprocessor system enters the shutdown mode;

[0036] A control module is used to update the environmental data in the static random access memory based on the motion data in the backup register when the microprocessor system wakes up from the shutdown mode, wherein the environmental data is used to support the operation of the microprocessor system.

[0037] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the system management method for an embedded device provided by an embodiment of the present invention when executing the computer program.

[0038] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the system management method for an embedded device provided in an embodiment of the invention are implemented.

[0039] In an embodiment of the present invention, when it is detected that the microprocessor system is idle, it is determined whether to enter the shutdown mode, the shutdown mode is used to shut down the hardware in the microprocessor except the RTC clock, and the shutdown mode is periodically awakened by the RTC clock; when the microprocessor system enters the shutdown mode, the motion data when the microprocessor system enters the shutdown mode is written into the backup register of the microprocessor; when the microprocessor system wakes up from the shutdown mode, based on the motion data in the backup register, the environmental data in the static random access memory is updated, and the environmental data is used to support the operation of the microprocessor system. The present invention can enter the shutdown mode when it is detected that the microprocessor system is idle, the shutdown mode is used to shut down the hardware in the microprocessor except the RTC clock, and the shutdown mode is periodically awakened by the RTC clock, which can reduce the power consumption of the device to the greatest extent, and through the function of the RTC clock, the device is periodically awakened, events are processed and detected, and the positioning process is initiated, so as to ensure that the embedded device meets the low power consumption and long-term operation requirements of the microprocessor system when the battery power is limited. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 is a flow chart of a system management method for an embedded device provided by an embodiment of the present invention;

[0042] Figure 2 It is a structural diagram of a system management device for an embedded device provided by an embodiment of the present invention;

[0043] Figure 3 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] like Figure 1 As shown, Figure 1 1 is a method flow chart of a system management method for an embedded device provided by an embodiment of the present invention. The system management method for an embedded device comprises the following steps:

[0046] 101. When the microprocessor system is detected to be idle, determine whether to enter a shutdown mode.

[0047] In an embodiment of the present invention, the embedded device includes a communication module, a pedometer module and a microprocessor, wherein the communication module and the pedometer module are respectively connected to the microprocessor for communication. The communication module can be a 5G module or other communication modules that can perform air interface positioning. The pedometer module can be a G-Sensor, and the microprocessor is also called MUC. The communication module is used for the air interface positioning process to obtain positioning data, the pedometer module is used to obtain step data, the microprocessor is used to determine the user's position change according to the step data, and control the communication module to initiate the air interface positioning process. The microprocessor includes a CPU (central processing unit), backup registers and static random access memory (SRAM), and also includes Flash, clock, PLL, peripherals, etc.

[0048] The above-mentioned embedded device may be a wearable embedded device, such as a sports bracelet, a sports head display device, etc. Specifically, the system management method of the embedded device is applied to a microprocessor in the embedded device.

[0049] The modes of the above-mentioned microprocessor system may include operating mode, sleep mode and shutdown mode, wherein the operating mode is the mode of the microprocessor system when processing data. In the operating mode, all modules of the embedded device and the microprocessor are in the operating state. The sleep mode is the mode adopted by the microprocessor system in the existing embedded device when it is idle. In the sleep mode, all modules of the embedded device and the CPU (central processing unit) in the microprocessor stop running, that is, the CPU in the MCU stops running, so that the device is in a low-power mode, reducing the energy consumption of the device. However, in Sleep Mode, most of the peripherals in the MCU are still in working mode (including SRAM, Flash, etc.). Shutdown is a low-power mode built into the MCU. In this mode, most of the devices inside the MCU (including CPU, SRAM, Flash, clock, PLL, and peripherals are turned off). The operating current of the MCU in this mode is several hundred nA, which can meet the low-power consumption requirements of the embedded device under long-term standby conditions.

[0050] The microprocessor system may be an MCU ROS system or other systems supporting microprocessors.

[0051] The operating status of the microprocessor system can be detected through the system log information of the microprocessor system, and whether it is necessary to enter the shutdown mode can be determined according to the system operating status. If it is detected that the idle time of the microprocessor system exceeds the set time, it means that the embedded device has not been working for a period of time, and it can be determined that it is necessary to enter the shutdown mode. Otherwise, it can enter the sleep mode. In a possible embodiment, the sleep mode can be canceled, and when the microprocessor system is detected to be idle, it directly enters the shutdown mode.

[0052] The shutdown mode is used to shut down the hardware in the microprocessor except the RTC clock. The shutdown mode is periodically awakened by the RTC clock. RTC is a real-time clock integrated in the MCU. Its operation is not affected by the system reset. It also runs normally in the shutdown mode. It provides time and wakeup timer functions, which can wake up the MCU from the shutdown mode.

[0053] 102. When the microprocessor system enters the shutdown mode, the motion data when the microprocessor system enters the shutdown mode is written into the backup register of the microprocessor.

[0054] In an embodiment of the present invention, the above-mentioned motion data may include positioning data and step data of the user (embedded device), and the above-mentioned motion data can be read from a static random access memory, or directly obtained through a communication module or a pedometer module.

[0055] When the MCU is in shutdown mode, the static random access memory SRAM will be turned off, and the user's current step count, positioning information and other environmental data Context will be lost. The backup registers provided by the MCU will keep the user's current step count, positioning information, etc. when entering shutdown mode.

[0056] 103. When the microprocessor system wakes up from the shutdown mode, the environmental data in the static random access memory is updated based on the motion data in the backup register.

[0057] In an embodiment of the present invention, when the microprocessor system is in shutdown mode, the microprocessor system is periodically awakened by the RTC clock. Each time it is awakened, motion data can be obtained from the backup register, and the acquired motion data is used to update the environmental data Context in the static random access memory.

[0058] The difference between the above environmental data and motion data lies in different storage locations and functions. In terms of storage location, the above environmental data is stored in static random access memory, and the above motion data is stored in backup registers. In terms of function, the above environmental data is used to support the operation of the microprocessor system, and the above motion data is used to indicate the current number of steps and current location of the user.

[0059] In the MCU, the CPU takes out the environment data Context from the static random access memory for calculation and obtains the corresponding result data. The above result data can be the current total step data and the current position and other data for display to the user.

[0060] In an embodiment of the present invention, when it is detected that the microprocessor system is idle, it is determined whether to enter the shutdown mode, the shutdown mode is used to shut down the hardware in the microprocessor except the RTC clock, and the shutdown mode is periodically awakened by the RTC clock; when the microprocessor system enters the shutdown mode, the motion data when the microprocessor system enters the shutdown mode is written into the backup register of the microprocessor; when the microprocessor system wakes up from the shutdown mode, based on the motion data in the backup register, the environmental data in the static random access memory is updated, and the environmental data is used to support the operation of the microprocessor system. The present invention can enter the shutdown mode when it is detected that the microprocessor system is idle, the shutdown mode is used to shut down the hardware in the microprocessor except the RTC clock, and the shutdown mode is periodically awakened by the RTC clock, which can reduce the power consumption of the device to the greatest extent, and through the function of the RTC clock, the device is periodically awakened, events are processed and detected, and the positioning process is initiated, so as to ensure that the embedded device meets the low power consumption and long-term operation requirements of the microprocessor system when the battery power is limited.

[0061] It should be noted that the system management method for embedded devices provided in the embodiments of the present invention can be applied to embedded devices such as smart bracelets, smart head displays, etc. that can perform the system management method for embedded devices.

[0062] It is understandable that in the specific implementation of this application, user data, device data, step data, positioning data, time data and other related data are involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data, as well as model training, deployment and use, must comply with relevant laws, regulations and standards of relevant countries and regions.

[0063] Optionally, in the step of periodically waking up the RTC clock in the shutdown mode, the RTC clock may be initialized; after the RTC clock initialization is completed, the motion data in the backup register is restored to the environmental data in the static random access memory.

[0064] In the embodiment of the present invention, the RTC clock is a hardware clock independent of the system main clock, which can continue to run when the system is turned off or in a dormant state, and provide accurate time information for the microprocessor system. In this technical solution, the RTC clock is not only used to provide time information, but also undertakes the task of periodically waking up the microprocessor.

[0065] The above process of initializing the RTC clock can be understood as a step that the microprocessor must complete before entering the shutdown mode. The above initialization process includes setting the initial date and cycle time of the RTC clock, thereby ensuring that the RTC clock can wake up the microprocessor at the correct time. The initial date setting can be the date set by the user or the date when the embedded device is first used, while the cycle time setting depends on the working requirements of the embedded device and the expected sleep time. For example, it can be 1s (1 second), and the RTC clock will wake up the embedded device (wake up the microprocessor) with a cycle of 1s. The specific value of the cycle time can be set according to the requirements.

[0066] After the RTC clock is initialized, the motion data in the backup register can be restored to the environment data in the static random access memory (SRAM). The backup register is a non-volatile storage unit that can save data when the microprocessor is turned off or in a dormant state. By saving the motion data when the microprocessor enters the shutdown mode through the backup register, data loss can be avoided in the shutdown mode.

[0067] In shutdown mode, most of the microprocessor's hardware is turned off to save power. However, the RTC clock is still running and counting according to the preset cycle time. When the preset wake-up time point is reached, the RTC clock triggers a wake-up signal to wake up the microprocessor from shutdown mode. After waking up, the microprocessor will first read the saved motion data from the backup register and restore this data to the environmental data in the SRAM, so that the microprocessor can be restored to the working state before entering the shutdown mode, and continue to execute previous tasks or process new events.

[0068] In some possible embodiments, a clock source with lower power consumption may be used to replace the RTC clock, or more energy-saving features may be added to the microprocessor to reduce the power consumption of the system in the shutdown mode.

[0069] By initializing the RTC clock, the accuracy of the wake-up time is determined. Further, through multiple links such as RTC clock initialization, cycle time setting, wake-up signal triggering and data recovery, it is ensured that the embedded device can still accurately and promptly resume working status after being shut down for a long time.

[0070] Optionally, in the step of initializing the RTC clock, the initial date and cycle time of the RTC clock can be set; the wake-up mode of the microprocessor system is determined to be wake-up start or reset start, in which the pedometer module has been initialized, and in which the pedometer module has not been initialized; if it is determined that the wake-up mode of the microprocessor system is wake-up start, it is determined that the RTC clock initialization is completed; if it is determined that the wake-up mode of the microprocessor system is reset start, the pedometer module is initialized, and after the pedometer module initialization is completed, it is determined that the RTC clock initialization is completed.

[0071] In an embodiment of the present invention, initializing the RTC clock may be to set the initial date and cycle time of the clock. The initial date may usually be set to the date after the device is first started or the last reset, or it may be a user-defined time, in order to ensure the accuracy and continuity of the timestamp. The cycle time is set according to the working requirements of the device and the expected low-power operation time. The longer the cycle time, the lower the overall power consumption. Of course, a reasonable cycle time setting can balance the power consumption and response speed of the device.

[0072] The above wake-up methods include wake-up start and reset start. In wake-up start, key components such as the pedometer module are already in the initialized state, and the microprocessor can directly resume work from the shutdown mode without re-initializing the pedometer module and other components. In reset start, since the system has undergone a comprehensive reset, components such as the pedometer module have not yet been initialized, so additional initialization steps are required.

[0073] Furthermore, if it is determined to be a wake-up start mode, it can be directly determined that the initialization of the RTC clock has been completed, and the microprocessor can prepare to enter the next working state. This is because, in the wake-up start mode, the system has retained the initialization state and data of the pedometer module for the microprocessor to continue its work after waking up.

[0074] If the reset startup mode is determined, the pedometer module needs to be initialized. This is because in the reset startup, the system status is completely reset, and all components including the pedometer module need to be reinitialized to work properly. The initialization process of the pedometer module includes resetting the module, setting the pedometer parameters, and turning on the pedometer function to ensure that the pedometer module can accurately detect and record the user's step data.

[0075] After the initialization of the pedometer module is completed, the initialization of the RTC clock is also completed. At this point, the RTC clock is ready to wake up the microprocessor when the set cycle time arrives, and the microprocessor can accurately obtain and process the data from the pedometer module after waking up.

[0076] Optionally, in the step of initializing the pedometer module, the pedometer module can be reset to put it in standby mode, the pedometer parameters of the pedometer module can be set, and the pedometer function of the pedometer module can be turned on to put the pedometer module in running mode to complete the initialization of the pedometer module.

[0077] In an embodiment of the present invention, the pedometer module is used to monitor and record the user's step data in real time. The step data can be used to determine the change in the user's position and control the communication module to initiate the air interface positioning process. It should be noted that after the microprocessor system enters the shutdown mode, the previously stored step data will be lost due to the shutdown of the SRAM. Therefore, when the microprocessor system wakes up from the shutdown mode, the pedometer module needs to be reinitialized to ensure that it can work normally and accurately record the steps.

[0078] The process of initializing the pedometer module may include a reset operation, setting the pedometer parameters of the pedometer module, and enabling the pedometer function of the pedometer module.

[0079] The reset operation is to reset the pedometer module to its initial state, which is usually achieved by sending a specific reset signal to the module. After the reset operation is completed, the pedometer module will be in standby mode, waiting for further instructions.

[0080] Set the pedometer parameters of the pedometer module. The pedometer parameters define how the pedometer module detects and records steps, such as sensitivity, step length, etc. Correct parameter setting is the key to ensuring the accuracy of step data. The pedometer parameters can be fine-tuned according to specific application scenarios and user needs. In a possible embodiment, the user's body data and the slope data of the current scene can be obtained, and the corresponding pedometer parameters are matched according to the user's body data and the slope data of the current scene, so as to determine the pedometer parameters that dynamically adapt to the user's body and the pedometer scenario.

[0081] After setting the pedometer parameters, turn on the pedometer function of the pedometer module. When the pedometer function is started, the pedometer module will begin to monitor the user's steps in real time and store the data in an internal buffer, waiting for the microprocessor system to read it.

[0082] After turning on the step counting function of the step counting module, the initialization process of the step counting module is completed. At this point, the module is already in the running mode and can accurately record and provide the user's step count data. It can then be determined that the initialization of the RTC clock is complete.

[0083] Optionally, after the microprocessor system wakes up from the shutdown mode, the current trusted timestamp is obtained from the RTC clock, and the current step count data is obtained from the pedometer module; it is determined whether it is necessary to control the communication module to initiate the air interface positioning process; if it is determined that the communication module needs to be controlled to initiate the air interface positioning process, the current trusted timestamp and the current step count data are updated to the environmental data of the static random access memory.

[0084] In the embodiment of the present invention, after the reset start or the shutdown mode wakeup start, the system initialization of the microprocessor system will be performed. The RTC clock, as a real-time clock, continues to run in shutdown mode to ensure the accuracy of time. After the device wakes up, the microprocessor can read the timestamp from the RTC clock.

[0085] The microprocessor can obtain the current step count data from the pedometer module. After the device wakes up, the pedometer module will provide the latest step count information as the current step count information.

[0086] The microprocessor can determine whether it is necessary to control the communication module to initiate the air interface positioning process based on the current trusted timestamp or the current step data. The current step data can be compared with the last positioning step data, and the current trusted timestamp and the last positioning timestamp can be analyzed to determine whether it is necessary to control the communication module to initiate the air interface positioning process. It can be understood that if the current step data differs greatly from the last positioning step data, it means that the user has moved a lot and the air interface positioning process needs to be initiated. Or if the current trusted timestamp differs greatly from the last positioning timestamp, it means that the device has been turned off for a long time, and the user is likely to move, and the air interface positioning process needs to be initiated.

[0087] After determining that the positioning process needs to be initiated, the microprocessor will update the current trusted timestamp and current step count data to the environmental data in the static random access memory (SRAM). In this way, the latest data is stored in a timely manner. At the same time, the fast read and write characteristics of SRAM also ensure the efficiency of data update.

[0088] Optionally, in the step of determining whether it is necessary to control the communication module to initiate the air interface positioning process, the step data of the last positioning or the trusted timestamp of the last positioning can be obtained from the environmental data of the static random access memory; if the step difference between the current step data and the step data of the last positioning is greater than the step threshold required for positioning, it is determined that the communication module needs to be controlled to initiate the air interface positioning process; if, if the time difference between the current trusted timestamp and the trusted timestamp of the last positioning is greater than the time threshold required for positioning, it is determined that the communication module needs to be controlled to initiate the air interface positioning process.

[0089] In an embodiment of the present invention, the step count data and the trusted timestamp of the last positioning are obtained from the environmental data of the static random access memory (SRAM). The step count data and the trusted timestamp of the last positioning are saved by the device at the last positioning, and are used to compare with the current data to determine whether the user's location may have changed significantly.

[0090] In one embodiment, the current step count data can be compared with the step count data of the last positioning. If the step count difference between the two is greater than a preset step count threshold, it means that the step count has changed significantly, which means that the user has moved a considerable distance and has exceeded the reasonable range of the last positioning position. At this time, it can be determined that the communication module needs to be controlled to initiate the air interface positioning process.

[0091] In one embodiment, the current trusted timestamp can be compared with the trusted timestamp of the last positioning. If the time difference between the two is greater than a preset time threshold, it means that a long time has passed since the last positioning, and the passage of time may also cause the previous location information to become inaccurate. At this time, it can also be determined that the positioning process needs to be initiated.

[0092] In a possible embodiment, when the step difference between the current step data and the step data of the last positioning is greater than the step threshold required for positioning, and the time difference between the current trusted timestamp and the trusted timestamp of the last positioning is greater than the time threshold required for positioning, it can be determined that the communication module needs to be controlled to initiate the air interface positioning process.

[0093] The above-mentioned step count threshold and time threshold can be set based on experience. By reasonably setting the step count threshold and time threshold, the positioning process can be automatically triggered after a significant change in the user's location or a certain period of time has passed, thereby updating the user's location information in a timely manner without the need for manual operation by the user.

[0094] In a possible embodiment, the step count threshold and the time threshold can be dynamically adjusted according to actual application requirements. In scenarios where higher positioning accuracy is required, these thresholds can be reduced to initiate the positioning process more frequently; and in scenarios where higher power consumption is required, the thresholds can be appropriately increased to reduce the positioning frequency.

[0095] Optionally, in the step of the microprocessor system entering the shutdown mode, the system Log information of the microprocessor system can be synchronized to the Flash storage device of the microprocessor; the wake-up function of the RTC clock can be disabled; the wake-up flag of the RTC clock can be cleared; the wake-up function of the RTC clock can be enabled; and the shutdown mode can be entered.

[0096] In an embodiment of the present invention, after completing the positioning detection and initiating the positioning process, if the microprocessor system is in an idle state and is ready to enter the shutdown mode, the current movement and positioning information Context can be saved to the Backup Registers, and the system log information of the microprocessor system can be synchronized to the Flash storage device of the microprocessor. In this way, the state and information of the system before shutdown can be saved so that it can be restored to the correct operating state after the system is reawakened. The system log information may include important data such as the operating status of the device, errors that have occurred, warnings, etc.

[0097] Disabling the wake-up function of the RTC clock can ensure that the RTC clock will not accidentally trigger a wake-up before entering the shutdown mode, thereby ensuring that the system can smoothly enter a low-power state. Disabling the wake-up function prevents any unnecessary interruptions during this process.

[0098] Clear the wake-up flag of the RTC clock. The wake-up flag is a flag used by the RTC clock to indicate whether there are pending events or interrupts. Clearing these flags before entering shutdown mode ensures that there will be no remaining wake-up requests during shutdown, thereby preventing the system from being woken up when it should not be woken up.

[0099] Re-enabling the wake-up function of the RTC clock can prepare for the periodic wake-up of the system after ensuring that all preconditions are met. Enabling the wake-up function of the RTC clock is a prerequisite for achieving periodic operation in low-power mode, allowing the system to be woken up after a specific time interval to process and detect events.

[0100] After completing the above operations, the microprocessor system officially enters shutdown mode. In shutdown mode, most of the hardware in the microprocessor will be turned off to minimize power consumption. Only the RTC clock keeps running to ensure that the system can be woken up according to the set cycle.

[0101] By finely controlling the state transitions of the microprocessor system, it is possible to ensure that the device achieves longer battery life and higher energy efficiency without affecting its basic functions.

[0102] The present invention is based on the system operation mode of the Shutdown low-power mode. When the wearable embedded device is in an idle state, the shutdown mode is entered to reduce the power consumption of the device to the greatest extent. Through the RTC Wakeup Timer (RTC clock wakeup) function, the device is periodically woken up, events are processed and detected, and a positioning process is initiated to ensure the low power consumption and long-term operation requirements of the system when the battery power of the device is limited.

[0103] like Figure 2As shown, an embodiment of the present invention provides a system management device for an embedded device, the embedded device includes a communication module, a pedometer module and a microprocessor, the communication module is used for an air interface positioning process to obtain positioning data, the pedometer module is used to obtain step data, the microprocessor is used to determine the user's position change according to the step data, and control the communication module to initiate the air interface positioning process, the system management method of the embedded device is applied to the microprocessor, the microprocessor includes a backup register and a static random access memory, and the system management device of the embedded device includes:

[0104] The detection module 201 is used to determine whether to enter a shutdown mode when detecting that the microprocessor system is idle. The shutdown mode is used to shut down the hardware in the microprocessor except the RTC clock. The shutdown mode is periodically awakened by the RTC clock.

[0105] A writing module 202, used for writing the motion data of the microprocessor system when entering the shutdown mode into the backup register of the microprocessor when the microprocessor system enters the shutdown mode;

[0106] The control module 203 is used to update the environmental data in the static random access memory based on the motion data in the backup register when the microprocessor system wakes up from the shutdown mode, wherein the environmental data is used to support the operation of the microprocessor system.

[0107] Optionally, the detection module 201 is further used to initialize the RTC clock; after the RTC clock is initialized, the motion data in the backup register is restored to the environmental data in the static random access memory.

[0108] Optionally, the detection module 201 is also used to set the initial date and cycle time of the RTC clock; determine whether the wake-up mode of the microprocessor system is wake-up start or reset start, in which the pedometer module has been initialized, and in which the pedometer module is not initialized; if it is determined that the wake-up mode of the microprocessor system is wake-up start, it is determined that the RTC clock initialization is completed; if it is determined that the wake-up mode of the microprocessor system is reset start, the pedometer module is initialized, and after the pedometer module initialization is completed, it is determined that the RTC clock initialization is completed.

[0109] Optionally, the detection module 201 is also used to reset the pedometer module, put the pedometer module in standby mode, set the pedometer parameters of the pedometer module, turn on the pedometer function of the pedometer module, so that the pedometer module is in running mode, and complete the initialization of the pedometer module.

[0110] Optionally, the device further comprises:

[0111] An acquisition module, used to acquire a current trusted timestamp from the RTC clock, and to acquire current step count data from the pedometer module;

[0112] A processing module, used to determine whether it is necessary to control the communication module to initiate the air interface positioning process;

[0113] The updating module is used to update the current trusted timestamp and the current step count data to the environment data of the static random access memory if it is determined that the communication module needs to be controlled to initiate the air interface positioning process.

[0114] Optionally, the processing module is also used to obtain the step data of the last positioning or the trusted timestamp of the last positioning from the environmental data of the static random access memory; if the step difference between the current step data and the step data of the last positioning is greater than the step threshold required for positioning, it is determined that the communication module needs to be controlled to initiate the air interface positioning process; if the time difference between the current trusted timestamp and the trusted timestamp of the last positioning is greater than the time threshold required for positioning, it is determined that the communication module needs to be controlled to initiate the air interface positioning process.

[0115] Optionally, the control module 203 is also used to synchronize the system log information of the microprocessor system to the Flash storage device of the microprocessor; disable the wake-up function of the RTC clock; clear the wake-up flag of the RTC clock; enable the wake-up function of the RTC clock; and enter the shutdown mode.

[0116] It should be noted that the system management device for embedded devices provided in the embodiments of the present invention can be applied to devices such as smart bracelets and smart head displays that can perform the system management method for embedded devices.

[0117] The system management device for embedded devices provided in the embodiment of the present invention can implement each process implemented by the system management method for embedded devices in the above method embodiment and can achieve the same beneficial effects. To avoid repetition, it will not be described here.

[0118] See also Figure 3 , Figure 3 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 3 As shown, it includes: a memory 302, a processor 301, and a computer program of a system management method for an embedded device stored in the memory 302 and executable on the processor 301, wherein:

[0119] The processor 301 is used to call the computer program stored in the memory 302 and execute the following steps:

[0120] When the microprocessor system is detected to be idle, determining whether to enter a shutdown mode, wherein the shutdown mode is used to shut down hardware in the microprocessor except for the RTC clock, and the shutdown mode is periodically awakened by the RTC clock;

[0121] When the microprocessor system enters the shutdown mode, writing the motion data when the microprocessor system enters the shutdown mode into the backup register of the microprocessor;

[0122] When the microprocessor system wakes up from the shutdown mode, the environmental data in the static random access memory is updated based on the motion data in the backup register, and the environmental data is used to support the operation of the microprocessor system.

[0123] Optionally, the shutdown mode executed by the processor 301 to periodically wake up through the RTC clock includes:

[0124] Initializing the RTC clock;

[0125] After the RTC clock is initialized, the motion data in the backup register is restored to the environment data in the static random access memory.

[0126] Optionally, the initializing the RTC clock performed by the processor 301 includes:

[0127] Setting the initial date and cycle time of the RTC clock;

[0128] Determining that the wake-up mode of the microprocessor system is a wake-up start or a reset start, in which the pedometer module has been initialized, and in which the pedometer module has not been initialized;

[0129] If it is determined that the wake-up mode of the microprocessor system is wake-up start, then determining that the RTC clock initialization is completed;

[0130] If it is determined that the wake-up mode of the microprocessor system is reset start, the pedometer module is initialized, and after the pedometer module is initialized, it is determined that the RTC clock initialization is completed.

[0131] Optionally, the initializing of the pedometer module performed by the processor 301 includes:

[0132] Reset the pedometer module to put the pedometer module in standby mode, set the pedometer parameters of the pedometer module, turn on the pedometer function of the pedometer module to put the pedometer module in running mode, and complete the initialization of the pedometer module.

[0133] Optionally, after the microprocessor system wakes up from the shutdown mode, the method executed by the processor 301 further includes:

[0134] Obtaining a current trusted timestamp from the RTC clock, and obtaining current step count data from the pedometer module;

[0135] Determining whether it is necessary to control the communication module to initiate the air interface positioning process;

[0136] If it is determined that the communication module needs to be controlled to initiate the air interface positioning process, the current trusted timestamp and the current step count data are updated to the environmental data of the static random access memory.

[0137] Optionally, the determining whether it is necessary to control the communication module to initiate the air interface positioning process performed by the processor 301 includes:

[0138] Acquire the step count data of the last positioning or the trusted timestamp of the last positioning from the environmental data in the static random access memory;

[0139] If the step difference between the current step data and the step data of the last positioning is greater than the step threshold required for positioning, it is determined that the communication module needs to be controlled to initiate the air interface positioning process;

[0140] If, the time difference between the current trusted timestamp and the trusted timestamp of the last positioning is greater than the time threshold required for positioning, it is determined that the communication module needs to be controlled to initiate the air interface positioning process.

[0141] Optionally, the microprocessor system entering the shutdown mode executed by the processor 301 includes:

[0142] Synchronize the system log information of the microprocessor system to the Flash storage device of the microprocessor;

[0143] Disable the wake-up function of the RTC clock;

[0144] Clear the wake-up flag of the RTC clock;

[0145] Enabling the wake-up function of the RTC clock;

[0146] Enter the shutdown mode.

[0147] It should be noted that the electronic device provided in the embodiment of the present invention can be applied to devices such as smart bracelets, smart head displays, etc. that can perform the system management method of embedded devices.

[0148] The electronic device provided by the embodiment of the present invention can implement each process implemented by the system management method of the embedded device in the above method embodiment, and can achieve the same beneficial effect. To avoid repetition, it will not be described here.

[0149] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the system management method for an embedded device provided by an embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0150] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0151] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A system management method for an embedded device, characterized in that: The embedded device includes a communication module, a pedometer module and a microprocessor. The communication module is used for an air interface positioning process to obtain positioning data. The pedometer module is used to obtain step count data. The microprocessor is used to determine a user position change according to the step count data and control the communication module to initiate the air interface positioning process. The system management method of the embedded device is applied to the microprocessor. The microprocessor includes a backup register and a static random access memory. The method includes the following steps: When the microprocessor system is detected to be idle, determining whether to enter a shutdown mode, wherein the shutdown mode is used to shut down hardware in the microprocessor except for the RTC clock, and the shutdown mode is periodically awakened by the RTC clock; When the microprocessor system enters the shutdown mode, writing the motion data when the microprocessor system enters the shutdown mode into the backup register of the microprocessor; When the microprocessor system wakes up from the shutdown mode, the environmental data in the static random access memory is updated based on the motion data in the backup register, and the environmental data is used to support the operation of the microprocessor system.

2. The system management method of an embedded device according to claim 1, characterized in that: The shutdown mode is periodically awakened by the RTC clock and includes: Initializing the RTC clock; After the RTC clock is initialized, the motion data in the backup register is restored to the environment data in the static random access memory.

3. The system management method of an embedded device as claimed in claim 2, characterized in that: The initializing the RTC clock comprises: Setting the initial date and cycle time of the RTC clock; Determining that the wake-up mode of the microprocessor system is a wake-up start or a reset start, in which the pedometer module has been initialized, and in which the pedometer module has not been initialized; If it is determined that the wake-up mode of the microprocessor system is wake-up start, then determining that the RTC clock initialization is completed; If it is determined that the wake-up mode of the microprocessor system is reset start, the pedometer module is initialized, and after the pedometer module is initialized, it is determined that the RTC clock initialization is completed.

4. The system management method of an embedded device as claimed in claim 3, characterized in that: The initializing the step counting module includes: Reset the pedometer module to put the pedometer module in standby mode, set the pedometer parameters of the pedometer module, turn on the pedometer function of the pedometer module to put the pedometer module in running mode, and complete the initialization of the pedometer module.

5. The system management method of an embedded device according to any one of claims 1 to 4, characterized in that: After the microprocessor system wakes up from the shutdown mode, the method further includes: Obtaining a current trusted timestamp from the RTC clock, and obtaining current step count data from the pedometer module; Determining whether it is necessary to control the communication module to initiate the air interface positioning process; If it is determined that the communication module needs to be controlled to initiate the air interface positioning process, the current trusted timestamp and the current step count data are updated to the environmental data of the static random access memory.

6. The system management method of an embedded device as claimed in claim 5, characterized in that: The determining whether it is necessary to control the communication module to initiate the air interface positioning process includes: Acquire the step count data of the last positioning or the trusted timestamp of the last positioning from the environmental data in the static random access memory; If the step difference between the current step data and the step data of the last positioning is greater than the step threshold required for positioning, it is determined that the communication module needs to be controlled to initiate the air interface positioning process; If, the time difference between the current trusted timestamp and the trusted timestamp of the last positioning is greater than the time threshold required for positioning, it is determined that the communication module needs to be controlled to initiate the air interface positioning process.

7. The system management method of an embedded device according to claim 1, characterized in that: The microprocessor system entering the shutdown mode comprises: Synchronize the system log information of the microprocessor system to the Flash storage device of the microprocessor; Disable the wake-up function of the RTC clock; Clear the wake-up flag of the RTC clock; Enabling the wake-up function of the RTC clock; Enter the shutdown mode.

8. A system management device for an embedded device, characterized in that: The embedded device includes a communication module, a pedometer module and a microprocessor. The communication module is used for an air interface positioning process to obtain positioning data. The pedometer module is used to obtain step count data. The microprocessor is used to determine a user position change according to the step count data and control the communication module to initiate the air interface positioning process. The system management method of the embedded device is applied to the microprocessor. The microprocessor includes a backup register and a static random access memory. The system management device of the embedded device includes: A detection module, used to determine whether to enter a shutdown mode when detecting that the microprocessor system is idle, wherein the shutdown mode is used to shut down the hardware in the microprocessor except the RTC clock, and the shutdown mode is periodically awakened by the RTC clock; A writing module, used for writing the motion data of the microprocessor system when entering the shutdown mode into the backup register of the microprocessor when the microprocessor system enters the shutdown mode; A control module is used to update the environmental data in the static random access memory based on the motion data in the backup register when the microprocessor system wakes up from the shutdown mode, wherein the environmental data is used to support the operation of the microprocessor system.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the system management method for an embedded device as claimed in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the system management method for an embedded device according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and system for reducing power consumption of MCU (Micro-Control Unit)

    CN104111850A

  • High-precision RTK receiving device and system supporting MQTT Internet of Things protocol

    CN111077542A

  • Low-power-consumption electricity-saving method for UWB positioning tag with automatic power-off control

    CN115243346A

  • Method and apparatus for power management in a multifunction controller with an embedded microprocessor

    US5848281A

Cited By

  • Standby circuit and control method of automatic external defibrillation device

    CN121300156A