Power management circuit and electronic equipment
By selecting erased pages for data writing in the power management circuit and immediately erasing other pages, the problem of long data writing time in non-volatile memory is solved, enabling fast data saving and system performance when power is lost. recover.
Patent Information
- Application Number
- CN202380019332.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-03-30
- Filing Date
- 2023-03-24
- Publication Date
- 2024-08-30
AI Technical Summary
When power is lost, the data writing process to the non-volatile memory takes a long time, affecting the quick recovery of the system.
Design a power management circuit to achieve fast writing of data by selecting erased pages in non-volatile memory as writing objects and erasing other pages immediately after writing is completed.
When power is lost, data writing can be completed in a short time, ensuring that the system can reliably save the internal state before it becomes inoperable.
Smart Images

Figure CN118575170A
Abstract
Description
Technical Field
[0001] The present disclosure relates to a power management circuit for managing and controlling multiple power supplies. Background Art
[0002] Mobile phones, tablet terminals, notebook personal computers (PCs), desktop PCs, and gaming devices are equipped with microprocessors such as CPUs (Central Processing Units) and GPUs (Graphics Processing Units) that perform calculations.
[0003] With the miniaturization of semiconductor manufacturing processes, the increase in the number of peripheral circuits installed, and the demand for low power consumption, electronic devices equipped with microprocessors are subdivided into multiple circuit blocks, and are configured so that the power supply voltage can be independently controlled for each circuit block.
[0004] In such a device, a power management IC (PMIC) is used to control a plurality of power supply systems corresponding to a plurality of circuit blocks. The PMIC includes a plurality of channels of power supply circuits and a nonvolatile memory.
[0005] When the nonvolatile memory is a multi-tine programmable (MTP) nonvolatile memory, if information on errors occurring inside the PMIC is stored in the nonvolatile memory as a log in advance, defects occurring in the PMIC can be verified.
[0006] [Prior art literature]
[0007] [Patent Literature]
[0008] Patent Document 1: Japanese Patent Application Publication No. 2014-206901 Summary of the invention
[0009] [Problems to be solved by the invention]
[0010] The address space of non-volatile memory is divided into units called "pages", and each page can be written. In the past, when a data write event occurred, the page to be written was erased, and the data was written after erasing. Therefore, the time from the occurrence of the write event to the completion of the data writing becomes longer.
[0011] In a situation where the remaining charge of a backup capacitor is used to operate when power is lost, the time required for writing data is preferably as short as possible.
[0012] The present disclosure is completed under the above circumstances, and one of the exemplary purposes of one solution is to provide a power management circuit capable of storing data in a short time.
[0013] [Technical solutions for solving technical problems]
[0014] One scheme disclosed herein relates to a power management circuit for controlling a plurality of power circuits. The power management circuit includes: a non-volatile memory that can be repeatedly written and has a plurality of pages; and a memory control circuit that selects one of the write objects from the plurality of pages of the non-volatile memory and writes internal data representing the internal state of the power management circuit into the write object page. The memory control circuit selects an erased page as a write object page to write the internal data, and erases pages other than the page that is the write object this time.
[0015] In addition, any combination of the above components and any substitution of components or expressions between methods, devices, systems, etc. are also valid as the present invention or the scheme disclosed herein. Furthermore, the description of this item (means for solving the problem) does not describe all the indispensable features of the present invention, and therefore, a sub-combination of these described features can also constitute the present invention.
[0016] Effects of the Invention
[0017] According to an aspect of the present disclosure, data can be written into a nonvolatile memory in a short time. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a block diagram of an electronic device including a power management integrated circuit according to an embodiment.
[0019] Figure 2 This is a diagram showing the structure of a nonvolatile memory.
[0020] Figure 3 Yes Figure 1 FIG. 1 is a diagram for explaining a write operation of snapshot data in a PMIC.
[0021] Figure 4 This is a diagram for explaining the writing of snapshot data in the comparative technique.
[0022] Figure 5 This is a diagram for explaining writing of snapshot data in a PMIC in the comparative technique.
[0023] Figure 6 This is a diagram for explaining writing of snapshot data in the PMIC according to the embodiment.
[0024] Figure 7This is a diagram for explaining detection of an erased page based on CRC.
[0025] Figure 8 A diagram showing data stored in a nonvolatile memory. DETAILED DESCRIPTION
[0026] (Overview of Implementation Methods)
[0027] Below, an overview of several exemplary embodiments of the present disclosure is described. This overview is a prelude to the detailed description described later. It simplifies and explains several concepts in one or more embodiments for the purpose of basic understanding of the embodiments, and does not limit the breadth of the invention or disclosure. This overview is not a comprehensive overview of all conceivable embodiments, nor is it intended to identify the important elements of all embodiments, or to divide the scope of some or all schemes. For convenience, "one embodiment" is sometimes used to refer to one embodiment (embodiment or variation) or multiple embodiments (embodiment or variation) disclosed in this specification.
[0028] A power management circuit of one embodiment controls a plurality of power circuits. The power management circuit includes: a non-volatile memory that can be repeatedly written and has a plurality of pages; and a memory control circuit that selects one of the write objects from the plurality of pages of the non-volatile memory and writes internal data representing the internal state of the power management circuit into the write object page. The memory control circuit selects an erased page as the write object page to write the internal data, and erases pages other than the write object page this time.
[0029] In this configuration, when internal data is written to a certain page, another page is immediately erased and preparations are made for the next write. This allows internal data to be stored in the nonvolatile memory in a short time after a write event occurs.
[0030] Alternatively, in one embodiment, the memory control circuit writes the internal data to a plurality of pages in a cyclic manner.
[0031] Alternatively, in one embodiment, when writing certain data, the memory control circuit uses a page that was erased in the previous writing as a writing target and erases the next page of the writing target.
[0032] In one embodiment, the memory control circuit may determine whether each page has been erased based on data stored in each page.
[0033] In one embodiment, the memory control circuit may determine that the page has been erased when an error is detected by a cyclic redundancy check for each page.
[0034] Alternatively, in one embodiment, the memory control circuit determines whether all pages have been erased when the power management circuit is activated.
[0035] In one embodiment, the memory control circuit may select a page with the smallest number of pages among the erased pages as the first writing target.
[0036] Alternatively, in one embodiment, the memory control circuit writes the count value increased by each write together with the data to each page, and when the erased page cannot be detected, when the count values of two adjacent pages are discontinuous, the page with the smaller count value among the two adjacent pages is used as the first write object.
[0037] Alternatively, in one embodiment, the power management circuit is integrated on a semiconductor substrate. The so-called "integrated" includes the case where all components of the circuit are formed on the semiconductor substrate, and the case where the main components of the circuit are integrated. Alternatively, part of the resistors and capacitors are provided outside the semiconductor substrate for adjusting the circuit constants. By integrating the circuit on one chip, the circuit area can be reduced, and the characteristics of the circuit elements can be uniformly maintained.
[0038] (Implementation Method)
[0039] The following describes a preferred embodiment with reference to the accompanying drawings. The same or equivalent components, members, and processes shown in the drawings are marked with the same reference numerals, and repeated descriptions are appropriately omitted. In addition, the embodiments do not limit the disclosure and invention, but are only examples. Not all features and combinations described in the embodiments are the substantive contents of the disclosure and invention.
[0040] In this specification, the so-called "the state in which component A and component B are connected" includes not only the case in which component A and component B are directly physically connected, but also the case in which component A and component B are indirectly connected via other components that do not substantially affect their electrical connection state or do not impair the function or effect of their combination.
[0041] Similarly, the so-called "a state in which component C is connected (set) between component A and component B" includes, in addition to the situation in which component A and component C, or component B and component C are directly connected, also includes the situation in which they are indirectly connected via other components that do not have a substantial impact on their electrical connection state or do not impair the function or effect achieved through their combination.
[0042] (Implementation Method)
[0043] Figure 1This is a block diagram of an electronic device 500 including a power management integrated circuit (PMIC: Power Management IC) 200 according to an embodiment. The electronic device may be a consumer device, an in-vehicle device, or an industrial device.
[0044] The PMIC 200 is mounted on an electronic device 500 having a plurality of n (n≧2) loads 502_1 to 502_n, and supplies an appropriate power supply voltage V to the plurality of loads 502_1 to 502_n. OUT1 ~V OUTn The type and number of the load 502 are not particularly limited. For example, the multiple loads 502_1 to 502_n may include a CPU (Central Processing Unit) or a RAM (Random Access Memory), an HDD (Hard Disk Drive), an SSD (Solid State Drive), an audio circuit, a display driver, etc. The unit of the configuration and function corresponding to one load 502 is referred to as a channel CH. n is referred to as the number of channels.
[0045] For example, some or all of the plurality of loads 502_1 to 502_n may be a plurality of blocks (CPU block, memory block) provided inside the microcontroller. Alternatively, the plurality of loads 502_1 to 502_n may be different devices.
[0046] In order to make the electronic device 500 operate normally, multiple loads 502 need to be started in a predetermined order, so the order of connecting and disconnecting the power supply voltages of these components needs to be correctly controlled at the order of several μs. For example, the power supply to the RAM should be completed before the CPU accesses the RAM.
[0047] The PMIC 200 mainly includes an interface circuit 202 , a control logic 210 , a plurality of D / A converters 240_1 to 240_n , a plurality of power supply circuits 250_1 to 250_n , and a nonvolatile memory 260 , and is a functional IC integrated on a semiconductor substrate.
[0048] Multiple power supply circuits 250_1~250_n correspond to multiple loads 502_1~502_n. Multiple power supply circuits 250_1~250_n are configured to be able to be switched on and off individually. The power supply circuit 250 can be a boost type, a buck type, a buck-boost type DC / DC converter, or a linear regulator such as LDO (Low Drop Output: low voltage difference linear regulator), or a charge pump circuit. It should be understood by those skilled in the art that part of the components constituting the power supply circuit 250, such as an inductor or a transformer, a smoothing capacitor, a resistor for feedback, a switching element, etc., are composed of chip components or discrete components and are externally provided to the IC of PMIC200.
[0049] A reference voltage V can be input to each power supply circuit 250_i (i=1, 2, . . . n). REFi The power supply circuit 250_i outputs a voltage V OUTi Stabilizes to the reference voltage V REFi The corresponding target level.
[0050] The control logic 210 controls the PMIC 200 in an integrated manner. One of the main functions of the control logic 210 is a sequencer 212. When the sequencer 212 of the control logic 210 detects an event associated with a change in the operation mode of the electronic device 500, the state of the power supply circuit 250_1 to 250_n is changed. The operation mode here can generally be exemplified by operation, rest, standby, shutdown, etc. Which operation mode is supported corresponds to the type of the electronic device 500, etc., and is not limited in the present disclosure.
[0051] For example, when the control logic 210 detects a start-up event, it starts the plurality of power circuits 250_1 ˜ 250_n in a predetermined order and at a predetermined time interval.
[0052] Furthermore, when a shutdown event is detected, the control logic 210 stops the plurality of power circuits 250_1 to 250_n in a predetermined order and at a predetermined time interval.
[0053] Furthermore, the control logic 210 switches some of the power supply circuits 250_1 to 250_n to a stopped state when a standby event is detected. Conversely, the control logic 210 switches some of the power supply circuits 250_1 to 250_n from a stopped state to an operating state when a standby resume event is detected.
[0054] PMIC200 generates a digital control signal D REF1 ~D REFn , the digital control signal D REF1 ~D REFnThe output voltage V of each of the plurality of power supply circuits 250_1 to 250_n is OUT1 ~V OUTn The target level of each digital control signal D REFi The corresponding D / A converter 240_i converts the analog reference voltage V REFi , and is supplied to the power supply circuit 250_i.
[0055] PMIC200 has a soft start function, which makes the output voltage V OUTi In addition, when the power supply circuit 250_i stops, the output voltage V OUTi During soft start, the control logic 210 makes the digital control signal D REFi Changes at a fixed slope.
[0056] Alternatively, the PMIC 200 may have a DVS (Dynamic Voltage Scaling) function. In this case, the output voltage V of each channel is OUT The interface circuit 202 receives data DVS_DATA from an external controller 510, which contains the output voltage V of each channel CHi. OUTi When receiving data DVS_DATA, PMIC200 makes the output voltage V OUTi The data DVS_DATA indicates the output voltage V of a channel CHi. OUTi The setting value changes.
[0057] The nonvolatile memory 260 is a multi-programmable (MTP) memory, and various data that define the operation of the sequencer 212 are stored in the nonvolatile memory 260. In addition, the nonvolatile memory 260 can store a plurality of data (hereinafter referred to as snapshot data SS) indicating the internal state of the PMIC 200. Alternatively, the snapshot data SS may be a combination of values stored in a plurality of registers provided in the nonvolatile memory 260. When the memory control circuit 214 detects an event that triggers the storage of the snapshot data SS (hereinafter referred to as a snapshot trigger event), the snapshot data SS is stored in the nonvolatile memory 260. The external controller 510 can read the snapshot data SS stored in the nonvolatile memory 260 via the interface circuit 202.
[0058] Figure 2This is a diagram showing the structure of the nonvolatile memory 260. The address space of the nonvolatile memory 260 is divided into units called "pages", and the nonvolatile memory 260 has a plurality of pages pg0 to pg7. In the present embodiment, the number of pages is 8. Some of the plurality of pages (pg0 to pg2) are allocated to parameters PARAM, etc. that define the actions of the sequencer, and the remaining pages (pg3 to pg7) are allocated to the storage of snapshot data SS.
[0059] Back to Figure 1 The control logic 210 includes a memory control circuit 214. The memory control circuit 214 selects one of the plurality of pages pg3 to pg7 of the nonvolatile memory 260 as a write target page, and writes the snapshot data SS into the write target page.
[0060] The memory control circuit 214 selects the erased page as a write target and writes the snapshot data SS therein. After the writing is completed, the memory control circuit 214 erases the pages other than the current write target page.
[0061] In this embodiment, the memory control circuit 214 cyclically writes snapshot data SS to multiple pages pg3 to pg7. Specifically, when a certain page pgi (i=3 to 7) is written as a write target and the snapshot data SS is written, the next page pg (i+1) is erased. Then, when writing the next snapshot data SS, page pg (i+1) becomes the write target. In addition, when i=7, i+1=3.
[0062] The above is the configuration of the PMIC 200. Next, the write operation of the snapshot data in the PMIC 200 will be described.
[0063] Figure 3 Yes Figure 1 This figure explains the writing operation of one snapshot data in the PMIC 200. Figure 3 , multiple pages of the nonvolatile memory 260 are shown. SS indicates a page storing snapshot data, and a blank page indicates that the page has been erased.
[0064] In the initial state S100 , page pg5 has been erased, and snapshot data SS is written into the remaining pages pg3 , pg4 , pg6 , and pg7 .
[0065] In the write state S102 after the initial state S102 , the memory control circuit 214 selects the erased page pg5 as the write target page, and writes new snapshot data SS into the page pg5 .
[0066] Then, in the erase state S104 after writing is completed, the next page pg6 of the page pg5 to which the snapshot data SS was just written is erased.
[0067] The above is the operation of the PMIC 200. Next, the advantages of the PMIC 200 will be described. The advantages of the PMIC 200 will become clear by comparison with comparative techniques, so the comparative techniques will be described.
[0068] Figure 4 This is a diagram for explaining the writing of snapshot data in the comparison technique. In the comparison technique, in the initial state S200, snapshot data is stored in all pages pg3 to pg7.
[0069] In the erase state S202, the memory control circuit 214 erases the write target page pg5. In the subsequent write state S204, the snapshot data SS is written to the page pg5 that was just erased before as the write target.
[0070] In the embodiment, one of the five pages pg3 is in an erased state, so four snapshot data SS can be stored in advance. In contrast, in the comparison technique, snapshot data can be stored in advance in all five pages pg3 to pg7.
[0071] Figure 5 This is a diagram for explaining the writing of snapshot data in the PMIC in the comparative technology. Here, it takes 20 ms for erasing and 20 ms for writing. In addition, it is assumed that a snapshot trigger event occurs 30 ms before the PMIC 200 becomes inoperable (time t0) due to a drop in power supply voltage, etc.
[0072] The comparison technique is described below. When a snapshot trigger event occurs at time t0, the write target page is erased. Then, at time t1 after the erasure is completed, the writing of the snapshot data SS begins. In this case, the writing cannot be completed before time t2 when the operation becomes inoperable.
[0073] Figure 6 1 is a diagram for explaining the writing of snapshot data in the PMIC 200 of the embodiment. In the embodiment, when a snapshot trigger event occurs at time t0, the snapshot data SS can be immediately written to the previously erased page. Therefore, the writing can be completed before the time t2 when the operation becomes inoperable. Of course, in this case, the erasure cannot be completed. The response to this situation will be described later.
[0074] As described above, according to the PMIC 200 of the embodiment, when a snapshot trigger event occurs just before the PMIC 200 becomes inoperable, the snapshot data SS can be saved reliably.
[0075] Next, the detection of erased pages is described. In the embodiment, in order to determine the write target page pg, information on which page has been erased is required. As a method for this, it is considered that each time a certain page is erased, the value indicating the erased page is pre-saved in the address space other than pages pg3 to pg7 used for snapshot data. This method is effective when the capacity of the non-volatile memory 260 is large, but it is difficult to adopt when the capacity of the non-volatile memory 260 is small.
[0076] In one embodiment, when the PMIC 200 is started, it reads and accesses all pages pg3 to pg7 and determines whether they have been erased based on the snapshot data SS stored in each page. Therefore, it is not necessary to store whether each page has been erased in advance.
[0077] The CRC (Cyclic Redundancy Check) value can be used to determine whether the data has been erased. When writing the snapshot data SS, the memory control circuit 214 writes the CRC value into the write target page together with the snapshot data SS.
[0078] The memory control circuit 214 performs CRC on each of pages pg3 to pg7 when the PMIC 200 is activated. No error is detected in the CRC for pages to which the snapshot data SS is normally written. On the other hand, an error is detected in the CRC for erased pages.
[0079] Figure 7 2 is a diagram for explaining the detection of erased pages based on CRC. Here, it is assumed that page pg4 is erased and snapshot data SS and CRC values are stored in the remaining pages.
[0080] When the CRC of the plurality of pages pg3 to pg7 is executed at the start-up of the PMIC 200 , the page to which the snapshot data SS is written is judged as passed, and the erased page is judged as failed. Therefore, it can be judged that the page pg4 is erased.
[0081] For example, the memory control circuit 214 currently holds a variable pg_ers indicating an erased page, in other words, indicating a write target page. At startup, when an erased page is detected, the value indicating the detected erased page is stored in the variable pg_ers. When a snapshot trigger event occurs, the memory control circuit 214 writes snapshot data SS to the page indicated by the variable pg_ers, and erases the page corresponding to the value (pg_ers+1). Then, after the erasure is completed, the value of the variable pg_ers is changed to (pg_ers+1). That is, the memory control circuit 214 increments the variable pg_ers every time it erases.
[0082] As reference Figure 6As described above, before the PMIC 200 is about to become inoperable, when a snapshot trigger event occurs, the writing of the snapshot data SS and the CRC value will be completed, but the PMIC 200 may sometimes shut down without performing the next page erase execution. In this case, when the PMIC 200 is started next time, when the CRC is executed for all pages, there will be no erased pages, so there is a possibility that all pages pass the judgment. In this case, the writing target page can be determined by the following method.
[0083] The memory control circuit 214 holds a variable ss_count indicating the number of times the snapshot data SS is stored. The variable ss_count is written to the write target page together with the snapshot data SS. When the writing of the snapshot data SS is completed, the variable ss_count is incremented.
[0084] Figure 8 2 is a diagram showing data stored in the nonvolatile memory 260. In each page, snapshot data SS, a CRC value, and a count value ss_count at the time of writing are stored.
[0085] Figure 8 Indicates a state where there is no erased page. In this case, as described above, the CRC will pass for all pages. In order to select the write target page, the memory control circuit 214 refers to the count value ss_count of each page and detects the position where the value is discontinuous between two adjacent pages. In addition, it is assumed that page pg7 is adjacent to pg3 for processing.
[0086] exist Figure 8 In the example, the count values ss_count of pages pg4 and pg5 are not continuous. Therefore, page pg5, which has a larger page number, becomes the write target page. When the memory control circuit 214 determines the write target page, it erases the page and stores the value representing its page number in the variable pg_ers. In addition, the value obtained by adding 1 to the largest value (in this example, 16) among the count values ss_count of multiple pages is used as the initial value of the variable ss_count maintained by the memory control circuit 214.
[0087] In this process, the page with the smallest count value ss_count becomes the write target page. Therefore, instead of or in addition to detecting discontinuity of page numbers, a process of detecting the page with the smallest count value ss_count may be performed.
[0088] This process makes it possible to appropriately determine the write target page when the PMIC 200 is activated next time, even if the operation of the PMIC 200 stops before erasing is completed.
[0089] (Variation)
[0090] It should be understood by those skilled in the art that the above-mentioned embodiments are merely examples, and various modifications may exist in the combination of their components or processing flows. Such modifications will be described below.
[0091] (Variant 1)
[0092] In the embodiment, one page is put into the erased state, but the present invention is not limited thereto, and two or more pages may be put into the erased state for use. In this case, the memory control circuit 214 may use the page with the smallest number of pages among the erased pages as the first writing object.
[0093] (Variant 2)
[0094] In the embodiment, the plurality of pages pg3 to pg7 are used cyclically, but the present invention is not limited thereto and the pages may be written in another order.
[0095] (Variant 3)
[0096] In the embodiment, the control logic 210 is described as being integrated with the power supply circuit 250 , but the present invention is not limited thereto, and only the control logic 210 may be an independent IC.
[0097] The embodiments of the present disclosure are described using specific terms, but the description is only for illustration to help understanding and does not limit the present disclosure or the claims, and the scope of the present invention is defined by the claims. In addition, not only the embodiments, but also the embodiments, examples, and modifications that will not be described here are also included in the scope of the present invention.
[0098] (Note)
[0099] In this specification, the following techniques are disclosed.
[0100] (Item 1)
[0101] A power management circuit controls multiple power circuits;
[0102] The power management circuit includes:
[0103] A non-volatile memory capable of repeated writing and having a plurality of pages, and
[0104] a memory control circuit that selects one of the write targets from the plurality of pages of the nonvolatile memory and writes internal data representing an internal state of the power management circuit into the write target page;
[0105] The memory control circuit selects an erased page as the write target page, writes the internal data, and erases pages other than the current write target page.
[0106] (Item 2)
[0107] A power management circuit as described in item 1, wherein:
[0108] The memory control circuit writes the internal data into the plurality of pages cyclically.
[0109] (Item 3)
[0110] A power management circuit as described in item 2, wherein:
[0111] When writing certain data, the memory control circuit uses a page that was erased in the previous writing as a writing target, and erases the next page of the writing target.
[0112] (Item 4)
[0113] The power management circuit according to any one of items 1 to 3, wherein:
[0114] The memory control circuit determines whether each page has been erased based on data stored in each page.
[0115] (Item 5)
[0116] A power management circuit as described in item 4, wherein:
[0117] The memory control circuit determines that each page has been erased when an error is detected by a cyclic redundancy check.
[0118] (Item 6)
[0119] The power management circuit according to any one of items 1 to 3, wherein:
[0120] The memory control circuit determines whether all pages have been erased when the power management circuit is activated.
[0121] (Item 7)
[0122] The power management circuit as described in item 6, wherein:
[0123] The memory control circuit selects the page with the smallest page number among the erased pages as the first writing target.
[0124] (Item 8)
[0125] The power management circuit as described in item 6, wherein:
[0126] The memory control circuit writes the count value incremented each time writing together with the data into each page, and
[0127] When an erased page cannot be detected and the count values are discontinuous between two adjacent pages, the page with the smaller count value among the two adjacent pages is selected as the first writing target.
[0128] (Item 9)
[0129] The power management circuit according to any one of items 1 to 3 is integrated on a semiconductor substrate.
[0130] (Item 10)
[0131] An electronic device comprises the power management circuit as described in any one of items 1 to 3.
[0132] [Industrial Applicability]
[0133] The present disclosure relates to a power management circuit for managing and controlling multiple power supplies.
[0134] [Explanation of Reference Numerals]
[0135] 200 PMIC
[0136] 202 Interface Circuit
[0137] 210 Control Logic
[0138] 212 Sequencer
[0139] 214 Memory control circuit
[0140] 250 Power Circuit
[0141] 260 Non-volatile memory.
Claims
1. A power management circuit that controls multiple power circuits; The power management circuit includes: A non-volatile memory capable of repeated writing and having a plurality of pages, and a memory control circuit that selects one of the write targets from the plurality of pages of the nonvolatile memory and writes internal data representing an internal state of the power management circuit into the write target page; The memory control circuit selects an erased page as the write target page, writes the internal data, and erases pages other than the current write target page.
2. The power management circuit according to claim 1, wherein: The memory control circuit writes the internal data into the plurality of pages cyclically.
3. The power management circuit as claimed in claim 2, wherein: When writing certain data, the memory control circuit uses a page that was erased in the previous writing as a writing target, and erases the next page of the writing target.
4. The power management circuit according to any one of claims 1 to 3, wherein: The memory control circuit determines whether each page has been erased based on data stored in each page.
5. The power management circuit as claimed in claim 4, wherein: The memory control circuit determines that each page has been erased when an error is detected by a cyclic redundancy check.
6. The power management circuit according to any one of claims 1 to 3, wherein: The memory control circuit determines whether all pages have been erased when the power management circuit is activated.
7. The power management circuit as claimed in claim 6, wherein: The memory control circuit selects the page with the smallest page number among the erased pages as the first writing target.
8. The power management circuit as claimed in claim 6, wherein: The memory control circuit writes the count value incremented each time writing together with the data into each page, and When an erased page cannot be detected and the count values are discontinuous between two adjacent pages, the page with the smaller count value among the two adjacent pages is selected as the first writing target.
9. The power management circuit according to any one of claims 1 to 3, which is integrated on a semiconductor substrate.
10. An electronic device comprising the power management circuit according to any one of claims 1 to 3.
