Method for managing dormancy of embedded system

By determining the duration of deep sleep modes and selecting appropriate memory types based on power consumption thresholds, the method optimizes data storage in embedded systems, reducing energy usage and extending non-volatile memory life.

CN119165942APending Publication Date: 2024-12-20STMICROELECTRONICS INT NV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410775594.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-05-21
Filing Date
2024-06-17
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Existing methods for managing deep sleep modes in embedded systems face challenges in efficiently saving software context data, as saving to RAM is power-intensive and saving to flash memory is costly in terms of current consumption and has reliability issues due to limited write/erase cycles.

Method used

A method that determines the duration of deep sleep mode and compares it to a threshold to decide whether to save software context data in volatile or non-volatile memory based on power consumption, using equations to calculate optimal energy usage and ensuring the non-volatile memory's longevity.

Benefits of technology

Reduces power consumption and extends the life of non-volatile memory by optimizing data storage during deep sleep modes, thereby enhancing energy efficiency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119165942A_ABST
    Figure CN119165942A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a method for managing dormancy of an embedded system. The invention relates to a method for managing a deep sleep mode of an embedded system. In an embodiment, a method includes determining a value of a charge used to save software context data into a non-volatile memory of a system during a deep sleep mode of the system; determining a value of a current for saving the software context data into a volatile memory of the system during a deep sleep mode of the system; determining a threshold from the previously determined value, the threshold defining a duration over which the power consumption caused by storing the software context data into the non-volatile memory is less than the power consumption caused by storing the software context data into the volatile memory; software context data is saved to non-volatile or volatile memory according to an expected duration of a deep sleep mode of the system.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of French Patent Application No. 2306353, filed on June 20, 2023, which is hereby incorporated by reference in its entirety. Technical Field

[0003] This description generally relates to deep sleep modes for embedded systems. Background Art

[0004] Embedded systems are autonomous electronic and computer systems that are designed to perform one or more specific tasks inside the device in which they are embedded, such as a vehicle or a connected object. Minimizing power consumption for many embedded systems is a key point that needs to be managed. When an embedded system is active, all of the system's memories are available, powered, and clocked using clock signals. The system software runs normally, and its execution context, the data sets used by the tasks performed by the software (such as data present in the stack, data in registers, or timer data) are continuously updated.

[0005] The system software can be set to a deep sleep mode to reduce the power consumption of the system. In this mode, most system components, especially one or more cores of the system, are no longer powered. Only a few elements remain powered, such as the real-time clock and the wake-up block. In the case of an embedded system communicating according to the NB-IoT (Narrowband Internet of Things) protocol, the duration of this deep sleep mode varies, for example, between 10 seconds and 213 days, with many possible values, such as 1 hour, 2 hours, 1 day, etc.

[0006] Before the deep sleep mode, some data stored in the system (called software context), such as data present in the stack, data in registers, or timer data, should be saved when leaving the deep sleep mode of the system to allow execution of the system's tasks to be resumed from the same point when it was cut off by entering the deep sleep mode.

[0007] The first option consists of saving these software context data in the system's random access memory (RAM). Since the system RAM is volatile during deep sleep mode, it is weakly powered by a dedicated regulator so that the data remains statically stored in the RAM. The current required to maintain the data is responsive to the temperature of the RAM.

[0008] The second option consists in saving these software context data in the system's flash memory. To perform this saving, the flash memory should first undergo a step of erasing the data stored therein. Erasing the data stored in the flash memory and writing the data of the software context implies high current consumption and takes some time to perform. Furthermore, the flash memory has a limited number of write / erase cycles before its reliability is affected. Finally, managing the location of the data inside the flash memory requires a file system, which can be complex. Summary of the invention

[0009] A solution that addresses the problems encountered by existing solutions would be advantageous.

[0010] Particular embodiments address at least some of these issues and provide a method for managing a deep sleep mode of an embedded system, the method comprising at least the steps of: determining a charge value Conso intended for possibly saving software context data in a non-volatile memory of the embedded system during the deep sleep mode of the embedded system; Non_Vola ; Determine a current value Courant intended for possibly saving software context data in a volatile memory of the embedded system at a first temperature during a deep sleep mode of the embedded system Sauv_Vola ; Based on the previously determined charge value Conso Non_Vola and current value Courant Sauv_Vola , determine the threshold Seuil Conso , threshold Seuil Conso A defined duration, over which the power consumption intended to be caused by possibly saving software context data in a non-volatile memory is less than the power consumption intended to be caused by possibly saving software context data in a volatile memory; when the expected duration of the deep sleep mode of the embedded system is above a previously determined threshold Seuil Conso , saves the software context data to non-volatile memory when the expected duration of deep sleep mode is less than or equal to the previously determined threshold Seuil Conso , saves software context data in volatile memory.

[0011] According to a specific embodiment, the charge value Conso is intended to be used to possibly save software context data in a non-volatile memory. Non_Vola It is expressed in coulombs and is determined by the following equation: Non_vola =(Courant Prog_Non_Vola ×d Prog_Non_Vola )+(Courant Eff_Non_Vola ×d Eff_Non_Vola )+(Courant Copie_Non_Vola×d Copie_Non_Vola ), where Courant Prog_Non_Vola is the value of the current used to program the nonvolatile memory, in amperes; d Prog_Non_Vola is the duration of programming the nonvolatile memory in seconds; Courant Eff_Non_Vola is the value of the current used to erase the portion of the nonvolatile memory, in amperes; d Eff_Non_Vola is the duration, in seconds, of erasing a portion of nonvolatile memory; Courant Copie_Non_Vola is the value of the current used to copy the software context data to the non-volatile memory, in amperes; and d Copie_Non_Vola is the duration in seconds to copy software context data to nonvolatile memory.

[0012] According to a specific embodiment, the threshold Seuil Conso Determined by the following equation:

[0013] According to a specific embodiment, the software context data is saved in the non-volatile memory under the following conditions: the expected duration of the deep sleep mode is less than or equal to the minimum duration d of the deep sleep mode. min , minimum duration d min The expected life of non-volatile memory is guaranteed and is expressed by the following equation: where d Vie is the expected lifetime of nonvolatile memory in years; Taille Contexte is the size of the software context data; N Max_Cycles is the theoretical maximum number of write / erase cycles that a nonvolatile memory can undergo before it degrades; and Mémoire_Libre Is the size of the free memory in the non-volatile memory.

[0014] In a specific embodiment, the software context data is saved in the non-volatile memory under the following conditions: Limited factor N cycles_vie The value of is less than the theoretical maximum number of write / erase cycles that a nonvolatile memory can undergo before it degrades, where N Cycles_Compteur is the number of write / erase cycles that the nonvolatile memory has undergone; Taille Contexte is the size of the software context data; and Taille Mémoire_Libre Is the size of the free memory in the non-volatile memory.

[0015] According to a specific embodiment, saving the software context data to the non-volatile memory includes implementing the following steps: Non_Vola Programming, mark D Non_Vola Instruct execution to save software context data into a non-volatile memory; determine a write start address into the non-volatile memory; write the software context data into the non-volatile memory starting from the previously determined write start address; subtract a duration for implementing the previous step of writing the software context data into the non-volatile memory from an expected duration of a deep sleep mode of the embedded system; and cut off power supply to the volatile memory.

[0016] According to a specific embodiment, the method further includes exiting the deep sleep mode of the embedded system, and exiting the deep sleep mode of the embedded system at least includes implementing the following steps: reading the flag D Non_Vola If the value of flag D Non_Vola The embedded system is set directly to the active state if the value of indicates execution saves the software context data to volatile memory, or if flag D Non_Vola If the value of indicates that the software context data is saved in the non-volatile memory, the software context data is read from the non-volatile memory starting from the write start address and written to the volatile memory. The non-volatile memory block storing the software context data is erased.

[0017] According to a specific embodiment, exiting the deep sleep mode of the embedded system further includes: before or after the step of reading the flag value, restoring the power supply of the volatile memory.

[0018] According to a specific embodiment, exiting the deep sleep mode of the embedded system further includes: reading the flag D Non_Vola Before the step of reading the value of the flag, a step of determining the reason for exiting the deep sleep mode of the embedded system is performed, and then if the exit from the deep sleep mode is due to a reset of the embedded system, an initial startup of the embedded system, a software update via FOTA, or a watchdog event, the embedded system is directly set to an active state without reading the value of the flag, or if the exit from the deep sleep mode is not due to a reset of the embedded mode, an initial startup of the embedded system, a software update via FOTA, or a watchdog event, reading the flag value is implemented.

[0019] According to a specific embodiment, an embedded system is provided, wherein the embedded system includes components for implementing the above method.

[0020] According to a specific embodiment, the non-volatile memory is flash memory and the volatile memory is RAM.

[0021] According to a specific embodiment, a computer program product is provided. The computer program product stores instructions. When the program is executed by an embedded system, the instructions enable it to implement the above method.

[0022] According to a specific embodiment, a computer-readable medium is provided, which stores instructions, and when the program is executed by the embedded system, it implements the above method. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above-mentioned features and advantages as well as other features and advantages will be described in detail in the following description of specific embodiments given by way of illustration and not limitation, with reference to the accompanying drawings, in which:

[0024] Figure 1 Schematically illustrates an example embodiment of an embedded system in which a method for managing a deep sleep mode of a system is implemented;

[0025] Figure 2 schematically illustrates an example of current consumption of a volatile memory and a non-volatile memory when toggling between an active mode and a deep sleep mode, wherein one of the memories is used to save software context data;

[0026] Figure 3 schematically illustrates the steps of an example method for managing a deep sleep mode of an embedded system;

[0027] Figure 4 illustrates values ​​of current intended to be used to potentially save software context data to volatile memory of an embedded system in a deep sleep mode of the embedded system for different temperatures; and

[0028] Figure 5 Thresholds for different temperatures are illustrated, the thresholds defining durations beyond which power consumption intended to be incurred by possibly saving software context data to non-volatile memory of the system is less than power consumption intended to be incurred by possibly saving software context data to volatile memory of the embedded system. DETAILED DESCRIPTION

[0029] Similar features have been designated by similar reference numerals in the various drawings. In particular, common structural and / or functional features in the various embodiments may have the same reference numerals, and may be provided with the same structure, dimensions, and material properties.

[0030] For the sake of clarity, only the operations and elements useful for understanding the embodiments described herein are illustrated and described in detail. Specifically, the coding required for the different steps of the method for implementing the deep sleep mode of the embedded system is not described in detail. Those skilled in the art will be able to implement the different functions of the method in detail based on the functional description provided herein.

[0031] Unless otherwise stated, when two elements are connected together, this means a direct connection without any intermediate elements other than conductors, and when two elements are coupled together, this means the two elements may be connected or coupled via one or more other elements.

[0032] Unless otherwise specified, the expressions "about," "approximately," "substantially," and "on the order of" mean within 10% and preferably within 5%.

[0033] Figure 1 An example embodiment of an embedded system 100 implementing the method for managing the deep sleep mode described herein is illustrated in FIG. Figure 1 , only some elements of system 100 are illustrated and described below.

[0034] In the example described here, the embedded system 100 communicates according to the NB-IoT protocol. It can be embedded in an NB-IoT device, for which managing power consumption is a key point.

[0035] According to this example embodiment, the system 100 includes a first core 102 or central circuit that manages security features and drives other elements of the system 100 .

[0036] According to this example embodiment, the system 100 also includes a second core 104 or central circuitry that performs the different functions, applications or tasks performed by the system 100. The second core 104 manages, for example, protocols such as IP, MQTT, TLS, etc. It may also manage simple functions such as measurements.

[0037] The system 100 according to this example embodiment also includes a third core 106 or central circuit that manages and performs communication between the system 100 and the external environment. The third core 106 is coupled to one or more memories, which in this example correspond to a first volatile memory 108 (e.g., RAM) and a first non-volatile memory 110 (e.g., flash memory), and also corresponds to the first core 102.

[0038] According to this example embodiment, the system 100 includes a power management unit 112 driven by the first core 102 and coupled with an RTC (Real Time Clock) block 113 .

[0039] According to this example embodiment, the system 100 further comprises a second volatile memory 114 , such as a so-called retention RAM (also referred to as RETRAM), and a second non-volatile memory 116 , such as a flash memory, coupled to the first core 102 and the second core 104 .

[0040] Alternatively, the architecture of system 100 may be different from Figure 1 The architecture described and illustrated in the accompanying drawings may include additional circuits or components or may not include some of the components or circuits previously described.

[0041] In addition, the elements of the system 100 may be different from the above elements. For example, the first RAM 108 and / or the second RAM 114 may correspond to another type of volatile memory. According to another example, the first flash memory 110 and / or the second flash memory 114 may correspond to another type of non-volatile memory, such as an EEPROM (Electrically Erasable Programmable Read-Only Memory) type.

[0042] Figure 2 Schematically illustrates the current consumption of volatile and non-volatile memories of an embedded system during different consecutive phases (active mode and deep sleep mode). In this schematic diagram, the duration of the different phases and the current amplitudes used during these different phases are not shown to scale relative to each other.

[0043] Figure 2 The scheme a) in FIG. 1 illustrates the evolution over time of the intensity of the current used by the second volatile memory 114 of the system 100 during different phases of use of the system 100. Reference numeral 10 denotes the current used when the system 100 is in active mode (the two separate phases of active mode are shown in FIG. Figure 2 Reference numeral 20 denotes the current used when the software context data is saved in the second volatile memory 114 when the system 100 is in deep sleep mode (between two active mode stages).

[0044] Figure 2Scheme b) in FIG. 1 illustrates the evolution over time of the intensity of the current used by the second non-volatile memory 116 of the system 100 during different phases of use of the system 100. Similar to scheme a), reference numeral 10 designates the current used by the second non-volatile memory 116 when the system 100 is in active mode. Reference numeral 30 designates the current used by the second non-volatile memory 116 during erasing of a portion of its block, such erasing being performed when triggered from a deep sleep mode to an active mode of the system 100. Reference numeral 40 designates the current used by the second non-volatile memory 116 during writing of software context data to the second non-volatile memory 116 before the system 100 finally enters deep sleep mode.

[0045] therefore, Figure 2 The schemes a) and b) in FIG. 1 illustrate the fact that when the software context data is saved to the second volatile memory 114, the energy consumption associated with the saving corresponds to the energy consumed by the memory in the deep sleep mode ( Figure 2 20 in the scheme a) of the present invention) and when the software context data is saved in the second non-volatile memory 116, the energy consumption associated with this saving corresponds to the current consumed during the erase and write operations implemented by the memory before and at the end of the deep sleep mode (corresponding to Figure 2 The consumption designated by reference numerals 30 and 40 in solution b) of FIG.

[0046] Figure 3 The steps of an example method for managing a deep sleep mode of the system 100 are schematically illustrated, the method performing a process of saving software context data of the system 100 to the second volatile memory 114 or the second non-volatile memory 116, depending on the power consumption involved in saving the data in each of the second volatile memory 114 and the second non-volatile memory 116.

[0047] In this example, the method begins when the system 100 is in an active mode, and exiting the active mode is initiated (step 200).

[0048] In the next step 202, during the deep sleep mode of the system 100, while possibly saving the software context data to the non-volatile memory of the system 100, taking into account the above Figure 1 The example system 100 described, the non-volatile memory corresponds to the second non-volatile memory 116 of the system 100, the charge value Conso Non_Vola In a specific exemplary embodiment, the charge value Conso in coulombs is determined. Non_Vola Determined by the equation: Conso Non_vola =(CourantProg_Non_Vola ×d Prog_Non_Vola )+(Courant Eff_Non_Vola ×d Eff_Non_Vola )+(Courant Copie_Non_Vola ×d Copie_Non_Vola ).

[0049] Factor Courant Prog_Non_Vola Corresponds to the value of the current used to program the nonvolatile memory 116, in amperes. Factor d Prog_Non_Vola Corresponds to the duration of programming the non-volatile memory 116 in seconds. Factor Courant Eff_Non_Vola The value corresponding to the current used to erase a portion of the non-volatile memory 116, in amperes. Factor d Eff_Non_Vola The duration corresponding to erasing a portion of non-volatile memory 116, in seconds. Factor Courant Copie_Non_Vola The value corresponding to the current used to copy the software context data to the non-volatile memory 116, in amperes. Factor d Copie_Non_Vola Corresponds to the duration, in seconds, of copying software context data into non-volatile memory 116 .

[0050] Therefore, the charge value Conso Non_Vola Corresponds to the sum of the charges that the nonvolatile memory 116 is intended to use during programming, erasing, and writing operations. As an example, the charge value Conso Non_Vola may be included between 630.8 μC (a minimum value obtained by taking into account a minimum duration for programming data, erasing data, and copying data to the nonvolatile memory 116) and 1261.6 μC (a maximum value obtained by taking into account a maximum duration for programming data, erasing data, and copying data to the nonvolatile memory 116), and may be for a charge value Conso Non_Vola Choose an average value included between these minimum and maximum values. Non_Vola It may be determined based on measurements that are not repeated each time the active mode of embedded system 100 is exited.

[0051] After step 202, for the first temperature, it is called Courant Sauv_Vola And the value of the current intended to be used to possibly save software context data to the volatile memory of the system 100 during the deep sleep mode of the system 100 is determined (step 204). Figure 1 In the example system 100 described herein, the volatile memory of the system 100 corresponds to the second volatile memory 114 of the system 100. Figure 4As shown, the current value Courant Sauv_Vola The current value Courant can be determined for different temperature values ​​using a curve or preset measurement points. For example, for a first temperature equal to 25°C, the current value Courant Sauv_Vola may be equal to 0.7 μA (in this example, this value includes the current consumed by the voltage regulator that allows the volatile memory to be powered during a deep sleep mode of the embedded system, as well as the current leakage observed during this deep sleep mode).

[0052] During a next step 206, based on the previously determined charge value Conso Non_Vola and current value Courant Sauv_Vola , threshold Seuil Conso The threshold Seuil Conso A duration is defined, over which the power consumption intended to be caused by possibly saving the software context data in the non-volatile memory 116 of the system 100 is less than the power consumption intended to be caused by possibly saving the software context data in the volatile memory 114 of the embedded system 100. According to a specific example embodiment, the threshold value Seuil expressed in seconds is Conso Determined by the equation:

[0053] Given the temperature-dependent current value Courant Sauv_Vola , threshold Seuil Conso Also depends on the temperature. Figure 5 The example threshold Seuil obtained is shown in Fig. Conso , the example threshold takes into account the charge value Conso Non_Vola The minimum value of (corresponding to the point with the lowest value for a given temperature), the charge value Conso Non_Vola The maximum value of (corresponding to the point with the highest value for a given temperature), and the charge value Conso Non_Vola The average value of (corresponding to points with values ​​between the low and high values ​​for a given temperature).

[0054] In the next step 208, it is determined that when the expected duration of the deep sleep mode of the embedded system is higher than the threshold Seuil Conso , whether to save the software context data to the non-volatile memory 116, or when the expected duration of the deep sleep mode of the embedded system is less than or equal to the threshold Seuil Conso When executing, whether to save the software context data to the volatile memory 114.

[0055] When it is determined that the execution saves the software context data to the volatile memory 114, the system 100 can directly enter the deep sleep mode (step 210). In such a case, given that the software context data is already in the volatile memory 114, saving the software context data to the volatile memory 114 includes maintaining the power shortage of the memory.

[0056] When it is determined that the software context data is to be saved in the non-volatile memory 116, the following steps may be performed by setting a flag D indicating that the software context data is to be saved in the non-volatile memory. Non_Vola Programming is performed to implement (step 212); determining or calculating the write start address in the non-volatile memory 116 (step 214); writing the software context data to the non-volatile memory 116 starting from the previously determined write start address (step 216); subtracting the duration of the previous step of implementing the writing of the software context data to the non-volatile memory 116 from the expected duration of the deep sleep mode of the system 100 (step 218); stopping the power supply to the volatile memory 114 (step 220).

[0057] After these steps, the system 100 may enter a deep sleep mode (step 210 ).

[0058] When exiting the deep sleep mode of the system 100 (step 220), the following steps can be implemented: restoring the power supply of the volatile memory 114 (step 224); determining the reason for exiting the deep sleep mode of the system 100 (step 226), and then if the exit from the deep sleep mode is due to a reset of the system 100, an initial startup of the system 100, a software update via FOTA (Firmware Over the Air), or a watchdog event, the system 100 is directly set to an active state without reading the value of the flag DNon_Vola (step 228), or if the exit from the deep sleep mode is not due to a reset of the system 100, an initial startup of the system 100, a software update via FOTA, or a watchdog event, then reading the value of the flag DNon_Vola is implemented (step 230).

[0059] If the flag D Non_Vola The value of indicates that the execution saves the software context data to the volatile memory 114, then the system 100 is directly set to the active state (step 228). Non_Vola The value of indicates that the software context data is saved to the non-volatile memory 116, the software context data is read from the non-volatile memory 116 starting from the write start address and written to the volatile memory 114 (step 232), and then the block of the non-volatile memory 116 storing the software context data is erased (step 234).

[0060] Alternatively, the step 224 of restoring the power supply to the volatile memory 114 may be performed after reading the flag D Non_Vola This restoration of the power supply to the volatile memory 114 occurs when saving the software context data to the non-volatile memory 116 and previously writing the software context data to the volatile memory 114 are performed, after the value of is realized.

[0061] In the previous example, updating the embedded system 100 may be done remotely via FOTA technology.The portion of the memory 112 reserved for these updates may be used to save software context data.

[0062] In the above method, the selection of the memory to which the saving of software context data is executed is determined by comparing the expected duration of the deep sleep mode of the system 100 with a threshold, the threshold defining a duration over which the power consumption intended to be caused by possibly saving the software context data in the non-volatile memory 116 of the system 100 is less than the power consumption intended to be caused by possibly saving the software context data in the volatile memory 114 of the system 100.

[0063] According to a first alternative to the above method, it is possible to save the software context data to a non-volatile memory under the following conditions: In addition to the previously discussed Seuil Conso In addition, the expected duration of the deep sleep mode is less than or equal to the minimum duration d of the deep sleep mode. Min , the minimum duration d Min The expected life of the non-volatile memory 116 is guaranteed. The minimum duration d Min It can be obtained by equation Indicates that, where d Vie is the expected lifetime of the nonvolatile memory 116, in years; Taille Contexte is the size of the software context data; N Max_Cycles is the theoretical maximum number of write / erase cycles that the nonvolatile memory 116 can undergo before it degrades; Taille Mémoire_Libre is the size of the free memory in the non-volatile memory 116 .

[0064] For example, the factor N Max_Cycles The value of is between 10000 and 100000.

[0065] According to a second alternative, it is possible to save the software context data to the non-volatile memory 116 under the following conditions: Limited factor N Max_CyclesThe value of N is less than the theoretical maximum number of write / erase cycles that the nonvolatile memory 116 can undergo before it degrades, where N Cycles_Compteur is the number of write / erase cycles that have been performed by the nonvolatile memory 116; Taille Contexte is the size of the software context data; Taille Mémoire_Libre is the size of the free memory in the non-volatile memory 116 .

[0066] The first alternative and the second alternative described above may be combined with each other, such that, under the condition that the three criteria discussed above are met, in such a case, the software context data is saved to the non-volatile memory 116 .

[0067] The nonvolatile memory 116 may correspond to a flash memory inside the system 100 , or may correspond to a flash memory outside the system 100 and be coupled to the latter.

[0068] In all the examples described above, saving the software context data to the non-volatile memory 116 may be performed using the file system of the non-volatile memory 116, or using a register having a size adapted to the size of the software context data present in the block RTC 113, the block RTC 113 being used to store the flag D Non_Vola and a write start address for storing software context data in the non-volatile memory 116 .

[0069] Compared with existing solutions, implementing the method can reduce current consumption when a system implementing the method is set in a deep sleep mode.

[0070] The above method can be advantageously implemented inside an embedded system, such as a system on chip or SoC, which includes volatile memory (such as RAM) and non-volatile memory (such as flash memory). According to a specific embodiment, the method can be implemented in an embedded system that communicates according to a NB-IoT type protocol (such as the LTE cat NB1 protocol).

[0071] Various embodiments and variations have been described. Those skilled in the art will appreciate that certain features of these embodiments may be combined and those skilled in the art will readily appreciate other variations.

[0072] Finally, based on the functional description provided above, the actual implementation of the embodiments and variations described herein is within the capabilities of those skilled in the art.

Claims

1. A method for managing a deep sleep mode in an embedded system, the method comprising: Determining a charge used to store software context data in a non-volatile memory of the embedded system during the deep sleep mode Determining a current used to store the software context data in a volatile memory of the embedded system at a first temperature during the deep sleep mode (Courant SauvVola ); determining a threshold based on the determined charge and the current, the threshold defining a duration over which a first power consumption for storing the software context data in the non-volatile memory is less than a second power consumption for storing the software context data in the volatile memory; In response to the expected duration of the deep sleep mode being greater than the threshold, storing the software context data in the non-volatile memory; as well as In response to the expected duration being less than or equal to the threshold, the software context data is stored in volatile memory.

2. The method according to claim 1, wherein the charge It is expressed in coulombs and is determined by the following equation: in is the current used to program the nonvolatile memory, in amperes; is the duration for programming the non-volatile memory, in seconds; is the current used to erase the portion of the nonvolatile memory, in amperes; is the duration, in seconds, for erasing the portion of the non-volatile memory; is the current, in amperes, used to copy the software context data to the non-volatile memory; and is the duration, in seconds, to copy the software context data to the non-volatile memory.

3. The method according to claim 2, wherein the threshold value (Seuil Conso ) is determined by the following equation:

4. The method according to claim 1, wherein storing the software context data in the non-volatile memory is further under the following condition: the expected duration of the deep sleep mode is less than or equal to the minimum duration of the deep sleep mode (d Min ), the minimum duration ensures the expected life of the non-volatile memory, the minimum duration (d Min ) is represented by the following equation: d_Min = (d_Vie×365×24×3600×Taille_Contexte) / (N_(Max_Cycles)×Taille_(Mémoire_Libre)), where d Vie is the expected lifetime of the non-volatile memory, in years; Taille Contexte is the size of the software context data; N_(Max_Cycles) is the theoretical maximum number of write / erase cycles of the non-volatile memory before it degrades; and is the free memory size of the non-volatile memory.

5. The method according to claim 1, wherein storing the software context data in the non-volatile memory is further under the following conditions: The limiting factor is less than the theoretical maximum number of write / erase cycles (N_(Max_Cycles)) of the non-volatile memory before it degrades, where is the number of write / erase cycles that have been performed by the nonvolatile memory, Taille Contexte is the size of the software context data, and is the free memory size of the non-volatile memory.

6. The method of claim 1 , wherein storing the software context data in the non-volatile memory comprises: programming a flag indicating that software context data is stored in the non-volatile memory; Determining a write start address of the non-volatile memory; Writing the software context data into the non-volatile memory starting from the write start address; subtracting a duration for writing the software context data to the non-volatile memory from the expected duration of the deep sleep mode; as well as Power supply to the volatile memory is cut off.

7. The method according to claim 6, further comprising: Exiting the deep sleep mode, wherein exiting the deep sleep mode comprises: reading the flag; In response to the flag indicating that the software context data is stored in the volatile memory, directly setting the embedded system to an active state; and The software context data is read from the nonvolatile memory starting from the write start address, the software context data is written to the volatile memory, and in response to the flag indicating that the software context data is stored in the nonvolatile memory, a block of memory in the nonvolatile memory is erased, the block of memory in the nonvolatile memory storing the software context data.

8. The method of claim 7, wherein exiting the deep sleep mode further comprises: Before or after reading the flag, the power supply to the volatile memory is restored.

9. The method of claim 7, wherein exiting the deep sleep mode further comprises: Before reading the flag, a reason for exiting the deep sleep mode of the embedded system is determined, wherein in response to the exit from the deep sleep mode being due to a reset of the embedded system, an initial startup of the embedded system, a wireless software update, or a watchdog event, the embedded system is directly set to an active state without reading the flag, and wherein the flag is read in response to the exit from the deep sleep mode being unrelated to the reset of the embedded system, the initial startup of the embedded system, the wireless software update, or the watchdog event.

10. An embedded system configured to operate in a deep sleep mode, the embedded system comprising: Non-volatile memory; Volatile memory; as well as A central circuit, the central circuit being configured to: Determining a charge (Console) used to store software context data in the non-volatile memory during the deep sleep mode Nonvola ), determining a current used to store the software context data in the volatile memory of the embedded system at a first temperature during the deep sleep mode determining a threshold based on the determined charge and the current, the threshold defining a duration over which a first power consumption for storing the software context data in the non-volatile memory is less than a second power consumption for storing the software context data in the volatile memory, In response to the expected duration of the deep sleep mode being greater than the threshold, storing the software context data in the non-volatile memory, and In response to the expected duration being less than or equal to the threshold, the software context data is stored in volatile memory.

11. The embedded system of claim 10, wherein the non-volatile memory is a flash memory, and wherein the volatile memory is a random access memory.

12. The embedded system according to claim 10, wherein the charge It is expressed in coulombs and is determined by the following equation: in is the current used to program the nonvolatile memory, in amperes; is the duration for programming the non-volatile memory, in seconds; is the current used to erase the portion of the nonvolatile memory, in amperes; is the duration, in seconds, for erasing the portion of the non-volatile memory; is the current, in amperes, used to copy the software context data to the non-volatile memory; and is the duration, in seconds, to copy the software context data to the non-volatile memory.

13. The embedded system according to claim 12, wherein the threshold value (Seuil Conso ) is determined by the following equation:

14. The embedded system according to claim 10, wherein storing the software context data in the non-volatile memory is further under the following condition: the expected duration of the deep sleep mode is less than or equal to the minimum duration of the deep sleep mode (d Min ), the minimum duration ensures the expected life of the non-volatile memory, the minimum duration (d Min ) is represented by the following equation: d_Min = (d_Vie × 365 × 24 × 3600 × Taille_Contexte) / (N_(Max_Cycles) × Taille_(Mémoire_Libre)), where d Vie is the expected lifetime of the non-volatile memory, in years; Taille Contexte is the size of the software context data; N_(Max_Cycles) is the theoretical maximum number of write / erase cycles of the non-volatile memory before it degrades; and is the free memory size of the non-volatile memory.

15. The embedded system according to claim 10, wherein storing the software context data in the non-volatile memory is also under the following conditions: The limiting factor is less than the theoretical maximum number of write / erase cycles (N_(Max_Cycles)) of the non-volatile memory before it degrades, where is the number of write / erase cycles that have been performed by the nonvolatile memory, Taille Contexte is the size of the software context data, and is the free memory size of the non-volatile memory.

16. The embedded system of claim 10, wherein storing the software context data in the non-volatile memory comprises: programming a flag indicating that software context data is stored in the non-volatile memory; Determining a write start address of the non-volatile memory; Writing the software context data into the non-volatile memory starting from the write start address; subtracting a duration for writing the software context data to the non-volatile memory from the expected duration of the deep sleep mode; as well as Power supply to the volatile memory is cut off.

17. The embedded system according to claim 16, further comprising: Exiting the deep sleep mode, wherein exiting the deep sleep mode comprises: reading the flag; In response to the flag indicating that the software context data is stored in the volatile memory, directly setting the embedded system to an active state; and The software context data is read from the nonvolatile memory starting from the write start address, the software context data is written to the volatile memory, and in response to the flag indicating that the software context data is stored in the nonvolatile memory, a block of memory in the nonvolatile memory is erased, the block of memory in the nonvolatile memory storing the software context data.

18. The embedded system according to claim 17, wherein exiting the deep sleep mode further comprises: Before or after reading the flag, the power supply to the volatile memory is restored.

19. The embedded system according to claim 17, wherein exiting the deep sleep mode further comprises: Before reading the flag, a reason for exiting the deep sleep mode of the embedded system is determined, wherein in response to the exit from the deep sleep mode being due to a reset of the embedded system, an initial startup of the embedded system, a wireless software update, or a watchdog event, the embedded system is directly set to an active state without reading the flag, and wherein the flag is read in response to the exit from the deep sleep mode being unrelated to the reset of the embedded system, the initial startup of the embedded system, the wireless software update, or the watchdog event.

20. A non-transitory computer readable medium storing computer instructions, wherein the instructions, when executed by a processor, cause an embedded system to: Determining a charge used to store software context data in a non-volatile memory of the embedded system during the deep sleep mode Nonvola ); Determining a current used to store the software context data in a volatile memory of the embedded system at a first temperature during the deep sleep mode (Courant SauvVola ); determining a threshold based on the determined charge and the current, the threshold defining a duration over which a first power consumption for storing the software context data in the non-volatile memory is less than a second power consumption for storing the software context data in the volatile memory; In response to the expected duration of the deep sleep mode being greater than the threshold, storing the software context data in the non-volatile memory; and In response to the expected duration being less than or equal to the threshold, the software context data is stored in volatile memory.

Citation Information

Patent Citations

  • Cellule en feuilles gonflable, pratiquement plane, a l'etat sans pression et susceptible d'etre utilisee comme generateur d'energie

    FR2306353A1