System management method and device for embedded device, electronic device and storage medium

By entering a shutdown mode when the wearable device's microprocessor system is idle, shutting down all hardware except the RTC clock, and periodically waking it up using the RTC clock, the problem of high standby power consumption of the MCU is solved, achieving the requirements of low power consumption and long-term operation.

CN119493605BActive Publication Date: 2025-11-21KINGSIGNAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The standby power consumption of MCUs in existing wearable devices is relatively high, making it difficult to meet the requirements for long-term low-power operation.

Method used

When the microprocessor system is idle, it enters shutdown mode, shuts down all hardware except the RTC clock, and periodically wakes up via the RTC clock. Motion data is written to the backup register and the environmental data in the static random access memory is updated upon wake-up.

Benefits of technology

Minimize device power consumption to ensure low power consumption and long-term operation with limited battery power.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493605B_ABST
    Figure CN119493605B_ABST
Patent Text Reader

Abstract

The application provides a system management method of an embedded device, comprising: when detecting that a microprocessor system is idle, determining whether to enter a shutdown mode, the shutdown mode being used for shutting down hardware in the microprocessor except for an RTC clock, and the shutdown mode being periodically woken up through the RTC clock; when the microprocessor system enters the shutdown mode, writing motion data when the microprocessor system enters the shutdown mode into a backup register of the microprocessor; and when the microprocessor system is woken up from the shutdown mode, updating environment data in a static random access memory based on the motion data in the backup register, the environment data being used for supporting the running of the microprocessor system. The device periodically woken up through the RTC clock to enter the shutdown mode, processes and detects events, initiates a positioning process, guarantees that the embedded device reduces the power consumption of the device to the maximum extent in the case that the battery power is limited, and meets the requirements of low power consumption and long time running of the microprocessor system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of embedded device technology, and in particular to a system management method, apparatus, electronic device, and storage medium for embedded devices. Background Technology

[0002] Current wearable embedded high-precision positioning devices typically employ a solution consisting of a communication module, an MCU, and a pedometer module. The communication module handles the high-precision air interface positioning process, while the MCU handles motion sensing, module control, low-power management, charging management, and power-on / off control. The pedometer module senses the user's movement speed and counts steps. The MCU uses the pedometer module's step counting function to determine changes in the user's location and initiates the air interface positioning process.

[0003] Low power consumption is a key requirement for wearable devices. Traditional real-time operating systems (RTS) for MCUs offer a Sleep Mode, which allows the system to run in Sleep Mode when idle. When an event occurs, the system is woken up to handle the event and task. Sleep Mode stops the CPU in the MCU, putting the device in a low-power mode and reducing energy consumption. However, in Sleep Mode, most peripherals in the MCU remain active (including SRAM and Flash), continuing to consume battery power. The MCU datasheet also shows that in Sleep Mode, the current consumption is still in the mA range, which is insufficient to meet the continuous operation requirements of wearable devices. For example, if a device is equipped with a 1000mA battery and requires six months of continuous operation on a single charge, the theoretical average operating current would be 230uA. Therefore, the standby power consumption of existing MCUs is relatively high. Reducing the standby power consumption of MCUs in wearable devices is a pressing issue. Summary of the Invention

[0004] This invention provides a system management method for embedded devices, aiming to solve the problem of reducing the standby power consumption of MCUs in wearable devices. When the microprocessor system is detected to be idle, it enters a shutdown mode. The shutdown mode disables all hardware in the microprocessor except for the RTC clock. The shutdown mode uses the RTC clock for periodic wake-up, which can minimize device power consumption. By periodically waking the device through the RTC clock, the device can process and detect events and initiate positioning processes, ensuring that the embedded device meets the low power consumption and long-term operation requirements of the microprocessor system even with limited battery power.

[0005] In a first aspect, embodiments of the present invention provide a system management method for an embedded device. The embedded device includes a communication module, a pedometer module, and a microprocessor. The communication module is used for an over-the-air positioning process to acquire positioning data. The pedometer module is used to acquire step count data. The microprocessor is used to determine changes in the user's location based on the step count data and control the communication module to initiate the over-the-air positioning process. The system management method for the embedded device is applied to the microprocessor, which 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, it is determined whether to enter the shutdown mode. The shutdown mode is used to shut down the hardware in the microprocessor except for the RTC clock. The shutdown mode is periodically woken up by the RTC clock.

[0007] When the microprocessor system enters the shutdown mode, the motion data of the microprocessor system when entering the shutdown mode is written 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. The environmental data is used to support the operation of the microprocessor system.

[0009] Optionally, the shutdown mode includes periodic wake-up via the RTC clock, comprising:

[0010] Initialize the RTC clock;

[0011] 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.

[0012] Optionally, initializing the RTC clock includes:

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

[0014] The wake-up mode of the microprocessor system is determined to be either wake-up startup or reset startup. In wake-up startup, the step counting module has been initialized, while in reset startup, the step counting module has not been initialized.

[0015] If the wake-up mode of the microprocessor system is determined to be wake-up startup, then the RTC clock initialization is determined to be complete.

[0016] If the wake-up method of the microprocessor system is determined to be reset start, the step counting module is initialized. After the step counting module is initialized, the RTC clock initialization is determined to be complete.

[0017] Optionally, initializing the step counting module includes:

[0018] Reset the step counting module to put it into standby mode, set the step counting parameters of the step counting module, turn on the step counting function of the step counting module, so that the step counting module is in running mode, and complete the initialization of the step counting module.

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

[0020] Obtain the current trusted timestamp from the RTC clock, and obtain the current step count data from the step counting module;

[0021] Determine 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, then the current trusted timestamp and the current step count data are updated in the environment data of the static random access memory.

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

[0024] Obtain the step count data of the last location or the reliable timestamp of the last location from the environmental data of the static random access memory;

[0025] If the step difference between the current step count and the previous step count is greater than the step count threshold required for positioning, then 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 previous location is greater than the time threshold required for location, then it is determined that the communication module needs to be controlled to initiate the air interface location 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] Enable the wake-up function of the RTC clock;

[0032] Enter the shutdown mode.

[0033] Secondly, embodiments of the present invention also provide a system management device for an embedded device. The embedded device includes a communication module, a step counting module, and a microprocessor. The communication module is used for an air interface positioning process to acquire positioning data. The step counting module is used to acquire step count data. The microprocessor is used to determine changes in the user's location based on 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 for the embedded device includes:

[0034] The detection module is used to determine whether to enter the shutdown mode when the microprocessor system is idle. The shutdown mode is used to shut down the hardware in the microprocessor except for the RTC clock. The shutdown mode is periodically woken up by the RTC clock.

[0035] The writing module is used to write the motion data of the microprocessor system when it enters the shutdown mode into the backup register of the microprocessor.

[0036] The control module is configured 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. The environmental data is used to support the operation of the microprocessor system.

[0037] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the system management method for the embedded device provided in embodiments of the present invention.

[0038] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the system management method for an embedded device provided in the embodiments of the present invention.

[0039] In this embodiment of the invention, when the microprocessor system is detected to be idle, it is determined whether to enter a shutdown mode. The shutdown mode is used to shut down all hardware in the microprocessor except for the RTC clock, and it is periodically woken up by the RTC clock. When the microprocessor system enters shutdown mode, motion data from that time is written to the microprocessor's backup register. When the microprocessor system wakes up from shutdown mode, environmental data in the static random access memory is updated based on the motion data in the backup register. This environmental data supports the operation of the microprocessor system. This invention allows the microprocessor system to enter a shutdown mode when it is detected to be idle. The shutdown mode, which shuts down all hardware in the microprocessor except for the RTC clock, and is periodically woken up by the RTC clock, can minimize device power consumption. By periodically waking up the device through the RTC clock, processing and detecting events, and initiating positioning processes, the embedded device can meet the low power consumption and long-term operation requirements of the microprocessor system even with limited battery power. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart of a system management method for an embedded device provided in an embodiment of the present invention;

[0042] Figure 2 This is a schematic diagram of the structure of a system management device for an embedded device provided in an embodiment of the present invention;

[0043] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] like Figure 1 As shown, Figure 1 This is a flowchart illustrating a system management method for an embedded device provided in an embodiment of the present invention. The system management method for the embedded device includes the following steps:

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

[0047] In this embodiment of the invention, the embedded device includes a communication module, a pedometer module, and a microprocessor, wherein the communication module and the pedometer module are communicatively connected to the microprocessor. The communication module can be a 5G module or other communication modules capable of over-the-air positioning. The pedometer module can be a G-sensor, and the microprocessor is also referred to as a MUC. The communication module is used for the over-the-air positioning process to acquire positioning data, the pedometer module is used to acquire step count data, and the microprocessor is used to determine changes in the user's location based on the step count data and control the communication module to initiate the over-the-air positioning process. The microprocessor includes a CPU (Central Processing Unit), backup registers, and static random access memory (SRAM), and also includes Flash memory, a clock, a PLL, peripherals, etc.

[0048] The aforementioned embedded devices can be wearable embedded devices, such as fitness trackers and head-mounted displays. Specifically, the system management methods for embedded devices are applied to the microprocessors within the embedded devices.

[0049] The aforementioned microprocessor system can include three modes: running mode, sleep mode, and shutdown mode. Running mode is the mode in which the microprocessor system processes data; in running mode, all modules of the embedded device and the microprocessor are running. Sleep mode is the mode used by the microprocessor system in existing embedded devices when idle. In sleep mode, all modules of the embedded device and the CPU (Central Processing Unit) in the microprocessor stop running, i.e., the CPU in the MCU stops running, putting the device in a low-power mode and reducing power consumption. However, in sleep mode, most 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 devices inside the MCU (including CPU, SRAM, Flash, clock, PLL, and peripherals) are turned off. The MCU's operating current in this mode is several hundred nA, which can meet the low-power requirements of embedded devices under long-term standby conditions.

[0050] The microprocessor system can be an MCU ROS system or other microprocessor-enabled systems.

[0051] The operating status of the microprocessor system can be detected through its system log information, and the need to enter shutdown mode can be determined based on the system's operating status. If the microprocessor system has been idle for a set period of time, it indicates that the embedded device has not been working for some time, and it can be determined that shutdown mode is required. Otherwise, it can enter hibernation mode. In one possible embodiment, hibernation mode can be disabled, and shutdown mode can be entered directly when the microprocessor system is detected to be idle.

[0052] Shutdown mode is used to disable all hardware in the microprocessor except for the RTC clock. Shutdown mode uses the RTC clock for periodic wake-up. The RTC is a real-time clock integrated within the MCU. Its operation is unaffected by system reset and it continues to function normally in Shutdown mode, providing both time and wakeup functions, enabling the MCU to be woken up from Shutdown mode.

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

[0054] In this embodiment of the invention, the motion data may include the user's (embedded device's) location data and step count data. The motion data can be read from a static random access memory or directly obtained through a communication module or a step counting module.

[0055] In Shutdown mode, the MCU shuts down the Static Random Access Memory (SRAM), and the user's current step count, location information, and other environmental data will be lost. The MCU's Backup Registers retain the user's current step count, location information, etc. when entering Shutdown mode.

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

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

[0058] The difference between the environmental data and motion data lies in their storage location and function. In terms of storage location, the environmental data is stored in static random access memory (SRAM), while the motion data is stored in a backup register. In terms of function, the environmental data supports the operation of the microprocessor system, while the motion data represents the user's current step count and current position.

[0059] In the MCU, the CPU retrieves the environment data (Context) from the static random access memory (SRAM), performs calculations, and obtains the corresponding result data. This result data can include the current total steps and the current position, among other data displayed to the user.

[0060] In this embodiment of the invention, when the microprocessor system is detected to be idle, it is determined whether to enter a shutdown mode. The shutdown mode is used to shut down all hardware in the microprocessor except for the RTC clock, and it is periodically woken up by the RTC clock. When the microprocessor system enters shutdown mode, motion data from that time is written to the microprocessor's backup register. When the microprocessor system wakes up from shutdown mode, environmental data in the static random access memory is updated based on the motion data in the backup register. This environmental data supports the operation of the microprocessor system. This invention allows the microprocessor system to enter a shutdown mode when it is detected to be idle. The shutdown mode, which shuts down all hardware in the microprocessor except for the RTC clock, and is periodically woken up by the RTC clock, can minimize device power consumption. By periodically waking up the device through the RTC clock, processing and detecting events, and initiating positioning processes, the embedded device can meet the low power consumption and long-term operation requirements of the microprocessor system even with limited battery power.

[0061] It should be noted that the system management method for embedded devices provided in this embodiment of the invention can be applied to embedded devices such as smart bracelets and smart head-mounted displays that are capable of performing system management methods for embedded devices.

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

[0063] Optionally, during the periodic wake-up step via the RTC clock in shutdown mode, the RTC clock can be initialized; after the RTC clock initialization is complete, the motion data in the backup register is restored to the environment data in the static random access memory.

[0064] In this embodiment of the invention, the RTC clock is a hardware clock independent of the system master clock, capable of continuous operation when the system is off or in sleep mode, providing accurate time information for the microprocessor system. In this technical solution, the RTC clock not only provides time information but also undertakes the task of periodically waking up the microprocessor.

[0065] The RTC clock initialization process described above can be understood as a necessary step that the microprocessor must complete before entering Shutdown mode. This initialization process includes setting the initial date and cycle time of the RTC clock to ensure that the RTC clock wakes up the microprocessor at the correct time. The initial date can be a user-defined date or the date the embedded device is first used, while the cycle time depends on the embedded device's operating requirements and expected sleep time. For example, it could be 1 second (1 sec), with the RTC clock waking up the embedded device (and the microprocessor) at 1-second intervals. The specific value of the cycle time can be set according to requirements.

[0066] After the RTC clock initialization is complete, the motion data in the backup register can be restored to the environment data in the static random access memory (SRAM). This backup register is a non-volatile storage unit capable of preserving data when the microprocessor is powered off or in sleep mode. Using the backup register to store the motion data when the microprocessor enters Shutdown mode prevents data loss during shutdown.

[0067] In Shutdown mode, most of the microprocessor's hardware is shut down to conserve power. However, the RTC clock continues to run, timing itself according to a preset cycle. When the preset wake-up time is reached, the RTC clock triggers a wake-up signal, waking the microprocessor from Shutdown mode. Upon waking, the microprocessor first reads the saved motion data from the backup registers and restores this data to the environmental data in SRAM, allowing it to return to its pre-Shutdown state and continue executing previous tasks or processing new events.

[0068] In some possible implementations, a lower-power clock source can be used instead of the RTC clock, or more energy-saving features can be added to the microprocessor to reduce the system's power consumption in Shutdown mode.

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

[0070] Optionally, in the step of initializing the RTC clock, the initial date and period of the RTC clock can be set; the wake-up mode of the microprocessor system can be determined as wake-up start or reset start. In wake-up start, the step counting module has been initialized, while in reset start, the step counting module has not been initialized; if the wake-up mode of the microprocessor system is determined to be wake-up start, then the RTC clock initialization is determined to be complete; if the wake-up mode of the microprocessor system is determined to be reset start, then the step counting module is initialized, and after the step counting module is initialized, the RTC clock initialization is determined to be complete.

[0071] In this embodiment of the invention, initializing the RTC clock can involve setting the initial date and cycle time of the clock. The initial date can typically be set to the date of the device's first startup or the date of the most recent reset, or it can be a user-defined time, to ensure the accuracy and continuity of the timestamp. The cycle time is set based on the device's operational requirements and expected low-power operating time; a longer cycle time results in lower overall power consumption. Of course, a reasonable cycle time setting can balance the device's power consumption and response speed.

[0072] The aforementioned wake-up methods include wake-up startup and reset startup. In wake-up startup, key components such as the pedometer module are already initialized, and the microprocessor can directly resume operation from shutdown mode without needing to re-initialize these components. However, in reset startup, because the system has undergone a complete reset, components such as the pedometer module have not yet been initialized, thus requiring additional initialization steps.

[0073] Furthermore, if the startup mode is determined to be wake-up mode, it can be directly confirmed 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 wake-up mode, the system has retained the initialization state and data of the step counting module, allowing the microprocessor to continue its work after waking up.

[0074] If a reset start is selected, the pedometer module needs to be initialized. This is because during a reset start, the system state is completely reset, and all components, including the pedometer module, need to be reinitialized to function properly. The initialization process for the pedometer module includes resetting the module, setting pedometer parameters, and enabling the pedometer function, ensuring that the pedometer module can accurately detect and record the user's step count.

[0075] After the pedometer module is initialized, the RTC clock is also initialized. At this point, the RTC clock is ready to wake up the microprocessor when the set period arrives, and the microprocessor can accurately acquire and process the data from the pedometer module after waking up.

[0076] Optionally, during the initialization of the step counting module, the step counting module can be reset to put it into standby mode, the step counting parameters of the step counting module can be set, and the step counting function of the step counting module can be turned on to put the step counting module into running mode, thus completing the initialization of the step counting module.

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

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

[0079] The reset operation involves resetting the step-counting module to its initial state, typically achieved by sending a specific reset signal to the module. After the reset operation is complete, the step-counting module will enter standby mode, awaiting further instructions.

[0080] Configure the step counting parameters of the step counting module. These parameters define how the module detects and records steps, such as sensitivity and stride length. Correct parameter settings are crucial for ensuring the accuracy of step count data. Step counting parameters can be finely adjusted based on specific application scenarios and user needs. In one possible embodiment, user body data and the slope data of the current environment can be acquired. The corresponding step counting parameters are then matched based on these data, thereby determining step counting parameters that dynamically adapt to the user's body and the current step counting environment.

[0081] After setting the step counting parameters, turn on the step counting function of the step counting module. Once the step counting function is activated, the step counting module will start monitoring 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 activating the step counting function of the step counting module, the initialization process of the step counting module is complete. At this point, the module is in operating mode and can accurately record and provide the user's step count data. Therefore, it can be confirmed that the RTC clock initialization is complete.

[0083] Optionally, after the microprocessor system wakes up from the shutdown mode, it obtains the current trusted timestamp from the RTC clock and the current step count data from the step counting module; determines whether it is necessary to control the communication module to initiate an air interface positioning process; if it is determined that it is necessary to control the communication module to initiate an air interface positioning process, it updates the current trusted timestamp and the current step count data to the environment data in the static random access memory.

[0084] In this embodiment of the invention, after a reset or wakeup in Shutdown mode, system initialization of the microprocessor-driven system is performed. The RTC clock, as a real-time clock, continues to run even in shutdown mode, ensuring time accuracy. 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 is woken up, the pedometer module will provide the latest step count information as the current step count.

[0086] The microprocessor can determine whether to control the communication module to initiate an air interface positioning process based on the current trusted timestamp or the current step count. It can compare the current step count with the previous positioning step count and analyze the current trusted timestamp with the previous positioning timestamp to determine whether to initiate the air interface positioning process. Understandably, if the current step count differs significantly from the previous positioning step count, it indicates significant user movement, necessitating the initiation of an air interface positioning process. Conversely, a significant difference between the current trusted timestamp and the previous positioning timestamp suggests a prolonged device shutdown time, indicating a high probability of user movement, also requiring the initiation of an air interface positioning process.

[0087] Once it is determined that a location process needs to be initiated, the microprocessor updates the current trusted timestamp and current step count data to the environment data in static random access memory (SRAM). This ensures timely storage of the latest data, while the fast read / write characteristics of SRAM also guarantee the efficiency of data updates.

[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 count data of the previous positioning or the trusted timestamp of the previous positioning can be obtained from the environmental data of the static random access memory; if the step count difference between the current step count data and the step count data of the previous positioning is greater than the step count threshold required for positioning, it is determined that it is necessary to control the communication module to initiate the air interface positioning process; or, if the time difference between the current trusted timestamp and the trusted timestamp of the previous positioning is greater than the time threshold required for positioning, it is determined that it is necessary to control the communication module to initiate the air interface positioning process.

[0089] In this embodiment of the invention, the step count data and trusted timestamp of the previous location are obtained from the environmental data in the static random access memory (SRAM). The step count data and trusted timestamp of the previous location are saved by the device during the previous location 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 from the previous location. If the difference in step count between the two is greater than a preset step count threshold, it indicates that the step count has changed significantly, meaning that the user has moved a considerable distance, exceeding the reasonable range of the previous location. In this case, it can be determined that the communication module needs to initiate an air interface positioning process.

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

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

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

[0094] In one possible implementation, the step count threshold and time threshold can be dynamically adjusted according to actual application requirements. In scenarios requiring higher positioning accuracy, these thresholds can be reduced to initiate the positioning process more frequently; while in cases with higher power consumption requirements, the thresholds can be appropriately increased to reduce the positioning frequency.

[0095] Optionally, during the steps of the microprocessor system entering 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 this embodiment of the invention, after completing the location detection and initiating the location process, if the microprocessor system is in an idle state and preparing to enter the shutdown mode, the current movement and location information (Context) can be saved to the Backup Registers, and the system log information of the microprocessor system can be synchronized to the microprocessor's Flash storage device. This saves the system's state and information before shutdown, 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 device's operating status, errors that occurred, and warnings.

[0097] Disabling the RTC clock wake-up function ensures that the RTC clock will not accidentally trigger a wake-up before entering shutdown mode, thus guaranteeing a smooth transition to a low-power state. Disabling the wake-up function prevents any unnecessary interruptions during this process.

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

[0099] Re-enabling the RTC clock wake-up function prepares the system for periodic wake-ups after ensuring all preconditions are met. Enabling the RTC clock wake-up function is a prerequisite for achieving periodic operation in low-power mode, allowing the system to be woken up at specific time intervals 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 is turned off to minimize power consumption. Only the RTC clock remains running to ensure that the system can be woken up according to the set cycle.

[0101] By precisely 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] This invention is based on the Shutdown low-power mode system operation mode. When the wearable embedded device is in an idle state, it enters the Shutdown mode to minimize device power consumption. Through the RTC Wakeup Timer function, the device is periodically woken up to process and detect events and initiate the positioning process, ensuring that the system meets the requirements of low power consumption and long-term operation when the battery power is limited.

[0103] like Figure 2As shown, this embodiment of the 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 acquire positioning data. The pedometer module is used to acquire step count data. The microprocessor is used to determine changes in the user's location based on the step count 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. The microprocessor includes a backup register and a static random access memory. The system management device for the embedded device includes:

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

[0105] The writing module 202 is used to write the motion data of the microprocessor system when it enters the shutdown mode into the backup register of the microprocessor.

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

[0107] Optionally, the detection module 201 is further configured to initialize the RTC clock; 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.

[0108] Optionally, the detection module 201 is further configured 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, wherein in wake-up start, the step counting module has been initialized, and in reset start, the step counting module has not been initialized; if the wake-up mode of the microprocessor system is determined to be wake-up start, then the RTC clock initialization is determined to be complete; if the wake-up mode of the microprocessor system is determined to be reset start, then the step counting module is initialized, and after the step counting module is initialized, the RTC clock initialization is determined to be complete.

[0109] Optionally, the detection module 201 is further configured to reset the step counting module, put the step counting module into standby mode, set the step counting parameters of the step counting module, and enable the step counting function of the step counting module to put the step counting module into running mode, thereby completing the initialization of the step counting module.

[0110] Optionally, the device further includes:

[0111] The acquisition module is used to acquire the current trusted timestamp from the RTC clock and to acquire the current step count data from the step counting module;

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

[0113] The update 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 initiate the air interface positioning process.

[0114] Optionally, the processing module is further configured to obtain the step count data of the previous positioning or the trusted timestamp of the previous positioning from the environmental data of the static random access memory; if the step count difference between the current step count data and the step count data of the previous positioning is greater than the step count threshold required for positioning, then it is determined that the communication module needs to be controlled to initiate the air interface positioning process; or, if the time difference between the current trusted timestamp and the trusted timestamp of the previous positioning is greater than the time threshold required for positioning, then 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 further configured 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 this embodiment of the invention can be applied to devices such as smart bracelets and smart head-mounted displays that can perform system management methods for embedded devices.

[0117] The system management device for embedded devices provided in this embodiment of the invention can implement all the processes of the system management method for embedded devices in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, further details are omitted here.

[0118] See Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 3 As shown, it includes: a memory 302, a processor 301, and a computer program for a system management method of 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 perform the following steps:

[0120] When the microprocessor system is detected to be idle, it is determined whether to enter the shutdown mode. The shutdown mode is used to shut down the hardware in the microprocessor except for the RTC clock. The shutdown mode is periodically woken up by the RTC clock.

[0121] When the microprocessor system enters the shutdown mode, the motion data of the microprocessor system when entering the shutdown mode is written 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. The environmental data is used to support the operation of the microprocessor system.

[0123] Optionally, the shutdown mode executed by processor 301, which involves periodic wake-up via the RTC clock, includes:

[0124] Initialize the RTC clock;

[0125] 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.

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

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

[0128] The wake-up mode of the microprocessor system is determined to be either wake-up startup or reset startup. In wake-up startup, the step counting module has been initialized, while in reset startup, the step counting module has not been initialized.

[0129] If the wake-up mode of the microprocessor system is determined to be wake-up startup, then the RTC clock initialization is determined to be complete.

[0130] If the wake-up method of the microprocessor system is determined to be reset start, the step counting module is initialized. After the step counting module is initialized, the RTC clock initialization is determined to be complete.

[0131] Optionally, the initialization of the step counting module performed by the processor 301 includes:

[0132] Reset the step counting module to put it into standby mode, set the step counting parameters of the step counting module, turn on the step counting function of the step counting module, so that the step counting module is in running mode, and complete the initialization of the step counting module.

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

[0134] Obtain the current trusted timestamp from the RTC clock, and obtain the current step count data from the step counting module;

[0135] Determine 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, then the current trusted timestamp and the current step count data are updated in the environment data of the static random access memory.

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

[0138] Obtain the step count data of the last location or the reliable timestamp of the last location from the environmental data of the static random access memory;

[0139] If the step difference between the current step count and the previous step count is greater than the step count threshold required for positioning, then 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 previous location is greater than the time threshold required for location, then it is determined that the communication module needs to be controlled to initiate the air interface location process.

[0141] Optionally, the microprocessor system entering the shutdown mode executed by 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] Enable 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 embodiments of the present invention can be applied to devices such as smart bracelets and smart head-mounted displays that can perform system management methods for embedded devices.

[0148] The electronic device provided in this embodiment of the invention can implement all the processes of the system management method for embedded devices in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, further details are omitted here.

[0149] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the system management method for the embedded device provided in this invention and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0150] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The computer-readable storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0151] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with 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 over-the-air positioning process to acquire positioning data. The pedometer module is used to acquire step count data. The microprocessor is used to determine changes in the user's location based on the step count data and control the communication module to initiate the over-the-air positioning process. The system management method of the embedded device is applied to the microprocessor. The microprocessor includes backup registers and static random access memory. The method includes the following steps: When the microprocessor system is detected to be idle, it is determined whether to enter the shutdown mode. The shutdown mode is used to shut down the hardware in the microprocessor except for the RTC clock. The shutdown mode is periodically woken up by the RTC clock. When the microprocessor system enters the shutdown mode, the motion data of the microprocessor system when entering the shutdown mode is written 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. The environmental data is used to support the operation of the microprocessor system. The microprocessor system entering the shutdown mode includes: 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; Enter the shutdown mode.

2. The system management method for embedded devices as described in claim 1, characterized in that, The shutdown mode includes periodic wake-up via the RTC clock, comprising: Initialize the RTC clock; 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.

3. The system management method for embedded devices as described in claim 2, characterized in that, The initialization of the RTC clock includes: Set the initial date and cycle time of the RTC clock; The wake-up mode of the microprocessor system is determined to be either wake-up startup or reset startup. In wake-up startup, the step counting module has been initialized, while in reset startup, the step counting module has not been initialized. If the wake-up mode of the microprocessor system is determined to be wake-up startup, then the RTC clock initialization is determined to be complete. If the wake-up method of the microprocessor system is determined to be reset start, the step counting module is initialized. After the step counting module is initialized, the RTC clock initialization is determined to be complete.

4. The system management method for embedded devices as described in claim 3, characterized in that, The initialization of the step counting module includes: Reset the step counting module to put it into standby mode, set the step counting parameters of the step counting module, turn on the step counting function of the step counting module, so that the step counting module is in running mode, and complete the initialization of the step counting module.

5. The system management method for an embedded device as described in any one of claims 1 to 4, characterized in that, After the microprocessor system wakes up from the shutdown mode, the method further includes: Obtain the current trusted timestamp from the RTC clock, and obtain the current step count data from the step counting module; Determine 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, then the current trusted timestamp and the current step count data are updated in the environment data of the static random access memory.

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

7. A system management device for an embedded device, characterized in that, The embedded device includes a communication module, a step counting module, and a microprocessor. The communication module is used for the air interface positioning process to acquire positioning data. The step counting module is used to acquire step count data. The microprocessor is used to determine changes in the user's location based on the step count data and control the communication module to initiate the air interface positioning process. The system management device of the embedded device is applied to the microprocessor. The microprocessor includes backup registers and static random access memory. The system management device of the embedded device includes: The detection module is used to determine whether to enter the shutdown mode when the microprocessor system is idle. The shutdown mode is used to shut down the hardware in the microprocessor except for the RTC clock. The shutdown mode is periodically woken up by the RTC clock. The writing module is used to write the motion data of the microprocessor system when it enters the shutdown mode into the backup register of the microprocessor. The control module is configured 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, the environmental data being used to support the operation of the microprocessor system; The microprocessor system entering the shutdown mode includes: 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; Enter the shutdown mode.

8. 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, when executing the computer program, implements the steps of the system management method for the embedded device as claimed in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the system management method for an embedded device as described in any one of claims 1 to 6.

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