Microcontroller and memory control method thereof

By combining a memory array, a memory controller, and a counter controller, and using the counter controller to control the memory clock count to achieve a power-saving mode, the high power consumption problem during microcontroller operation is solved, and the power-saving effect and efficiency of the microcontroller are improved.

CN116360577BActive Publication Date: 2026-11-24NUVOTON
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210457269.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-12-28
Filing Date
2022-04-28
Publication Date
2026-11-24
Estimated Expiration
2042-04-28

AI Technical Summary

Technical Problem

Existing microcontrollers consume a lot of power during operation, especially in non-sleep or power-off states, and cannot effectively reduce the power consumption of memory components.

Method used

It employs a combination of memory array, memory controller, and counter controller. The counter controller counts based on the memory clock. When the count value reaches a preset value, it controls the memory controller to enter a power-saving mode to reduce operations on infrequently used memory blocks. When an operation command is received, the count value is reset and the system enters the operation mode.

Benefits of technology

During operation, it effectively reduces the power consumption of infrequently used memory controllers and memory blocks, improves the power-saving efficiency of the microcontroller, and reduces unnecessary frequent switching of operating modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116360577B_ABST
    Figure CN116360577B_ABST
Patent Text Reader

Abstract

This invention provides a microcontroller and its memory control method. The microcontroller includes a memory array, multiple memory controllers, and multiple counting controllers. The memory array includes multiple memory blocks. Each of the multiple counting controllers counts based on a memory clock to generate a count value. When the count value reaches a preset value, the counting controller corresponding to that count value controls the corresponding memory controller to enter a power-saving mode. Upon receiving an operation command, the counting controller resets the count value and controls the corresponding memory controller to enter an operation mode. The microcontroller of this invention can reduce the power consumption of infrequently used memory controllers and memory blocks during operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a microcontroller and a memory control method for the microcontroller, and more particularly to a microcontroller with low power consumption during operation and a memory control method for the microcontroller. Background Technology

[0002] Microcontrollers are integrated into electronic devices as the core of their data processing. To reduce the power consumption of these devices, the power consumption of the microcontroller itself must also be reduced. Generally, microcontrollers provide built-in memory components (such as those including static random access memory (SRAM)) for fast data access. When the electronic device is powered off or in sleep mode, the microcontroller shuts down the operation of the memory components, thus saving power. However, this power-saving effect is only achieved when the electronic device is powered off or in sleep mode. Summary of the Invention

[0003] This invention provides a microcontroller capable of operating with low power consumption and a memory control method for the microcontroller.

[0004] The microcontroller of this invention includes a memory array, multiple memory controllers, and multiple counter controllers. The memory array includes multiple memory blocks. The multiple memory controllers are correspondingly coupled to the multiple memory blocks. Each of the multiple memory controllers operates on a corresponding memory block within the multiple memory blocks in an operating mode. The multiple counter controllers are correspondingly coupled to the multiple memory controllers. The multiple counter controllers count based on a memory clock to generate a count value. When the count value reaches a preset value, the counter controller controls the corresponding memory controller to enter a power-saving mode to stop operating on the corresponding memory block within the multiple memory blocks. Furthermore, when an operation command is received, the counter controller resets the count value and controls the corresponding memory controller to enter an operating mode.

[0005] The memory control method of the present invention is used to control the internal memory of a microcontroller. The microcontroller includes a memory array, multiple memory controllers, and multiple counter controllers. The memory array includes multiple memory blocks. The multiple memory controllers are correspondingly coupled to the multiple memory blocks. The multiple counter controllers are correspondingly coupled to the multiple memory controllers. The memory control method includes: receiving a memory clock using the multiple counter controllers and counting based on the memory clock to generate a count value; when the count value of a corresponding counter controller among the multiple counter controllers reaches a preset value, controlling the corresponding memory controller among the multiple memory controllers to enter a power-saving mode to stop operating on the corresponding memory block among the multiple memory blocks; and when the corresponding counter controller receives an operation command, resetting the count value and controlling the corresponding memory controller to enter an operation mode, so that the corresponding memory controller operates on the corresponding memory block according to the operation command.

[0006] Based on the above, the counting controller generates a count value based on the memory clock. When the count value reaches a preset value, the counting controller controls the corresponding memory controller to enter a power-saving mode. Therefore, the corresponding memory controller and the corresponding memory block will not operate. In this way, the power consumption of the corresponding memory controller and the corresponding memory block can be saved. Once an operation command is received, the counting controller resets the count value and controls the corresponding memory controller to enter the operation mode. In this way, the microcontroller can reduce the power consumption of infrequently used memory controllers and memory blocks during operation.

[0007] To make the above features and advantages of the present invention more apparent and understandable, specific embodiments are described below in conjunction with the accompanying drawings. Attached Figure Description

[0008] Figure 1 This is a schematic diagram of a microcontroller illustrated according to the first embodiment of the present invention.

[0009] Figure 2 This is a flowchart of a memory control method according to an embodiment of the present invention.

[0010] Figure 3 This is a first timing diagram drawn according to an embodiment of the present invention.

[0011] Figure 4 This is a second timing diagram drawn according to an embodiment of the present invention.

[0012] Figure 5 This is a third timing diagram illustrated according to an embodiment of the present invention.

[0013] Figure 6 This is a partial schematic diagram of a microcontroller illustrated according to a second embodiment of the present invention.

[0014] Figure Labels

[0015] 100: Microcontroller

[0016] 110: Memory Array

[0017] 120_1~120_n, 220_1: Memory controller

[0018] 130_1~130_n, 230_1: Counting controller

[0019] 140: Processor

[0020] 221: Mode Control Circuit

[0021] 231: Counter

[0022] 232: Buffer

[0023] 233: Judgment Circuit

[0024] ADD: address

[0025] BS: Bus

[0026] CLK: Memory Clock

[0027] CMD: Operation Commands

[0028] CNT1~CNTn: Count values

[0029] DTA: Data

[0030] DV: Preset value

[0031] SEG1~SEGn: Memory blocks

[0032] S110~S150: Steps

[0033] SC: Control signal

[0034] SC1: First control signal

[0035] SC2: Second control signal

[0036] t1~t7: Time points

[0037] TD1: First Timing Diagram

[0038] TD2: Second Timing Diagram

[0039] TD3: Third Timing Diagram Detailed Implementation

[0040] Reference will now be made in detail to exemplary embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same component symbols are used in the drawings and description to denote the same or similar parts.

[0041] Please refer to Figure 1 , Figure 1 This is a schematic diagram of a microcontroller according to a first embodiment of the present invention. In this embodiment, the microcontroller 100 includes a memory array 110, memory controllers 120_1 to 120_n, and counting controllers 130_1 to 130_n. The memory array 110 includes memory blocks SEG1 to SEGn. Memory blocks SEG1 to SEGn may include, for example, multiple static random access memory cells (SRAM cells), but the present invention is not limited thereto. Memory controllers 120_1 to 120_n are correspondingly coupled to memory blocks SEG1 to SEGn. In operation mode, memory controllers 120_1 to 120_n operate on corresponding memory blocks in memory blocks SEG1 to SEGn. Taking this embodiment as an example, memory controller 120_1 is coupled to memory block SEG1. Memory controller 120_1 operates on memory block SEG1 in operation mode. Memory controller 120_2 is coupled to memory block SEG2. Memory controller 120_2 operates on memory block SEG2 in operating mode. Similarly, memory controller 120_n is coupled to memory block SEGn. Memory controller 120_n operates on memory block SEGn in operating mode.

[0042] In some embodiments, memory controller 120_1 is coupled to memory blocks SEG1 and SEG2. Memory controller 120_n operates on memory blocks SEG1 and SEG2 in an operating mode. This invention is not limited to this. Figure 1 The coupling methods of memory controllers 120_1 to 120_n and memory blocks SEG1 to SEGn are limited to those of memory controllers 120_1 to 120_n.

[0043] In this embodiment, counting controllers 130_1 to 130_n are correspondingly coupled to memory controllers 120_1 to 120_n. Taking this embodiment as an example, counting controller 130_1 is coupled to memory controller 120_1. Counting controller 130_2 is coupled to memory controller 120_2, and so on. Counting controllers 130_1 to 130_n count based on the memory clock CLK to generate count values ​​CNT1 to CNTn. Counting controllers 130_1 to 130_n determine the mode of the corresponding memory controller based on the count values ​​CNT1 to CNTn and the operation command CMD, respectively.

[0044] Taking the counter controller 130_1 as an example, when the count value CNT1 has not yet reached the preset value, the counter controller 130_1 will continue to count based on the memory clock CLK. When the count value CNT1 reaches the preset value, the counter controller 130_1 will control the memory controller 120_1 to enter power-saving mode. Therefore, the memory controller 120_1 stops operating on the memory block SEG1. When the counter controller 130_1 receives the operation command CMD, the counter controller 130_1 will reset the count value CNT1 and control the memory controller 120_1 to enter the operation mode. Therefore, the memory controller 120_1 operates on the memory block SEG1 according to the operation command CMD.

[0045] The memory array 110, memory controllers 120_1 to 120_n, and counter controllers 130_1 to 130_n can be considered as the internal memory circuitry of the microcontroller 100. The memory clock CLK can be a clock provided internally by the microcontroller 100.

[0046] When an operation command CMD is received before the counter value CNT1 reaches the preset value, the counter controller 130_1 will also reset the counter value CNT1. Therefore, the time that the memory controller 120_1 is in operation mode will be extended.

[0047] In this embodiment, the counting controllers 130_1 to 130_n count the number of times the memory clock CLK is executed. Therefore, the count values ​​CNT1 to CNTn are associated with the length of time that memory controllers 120_1 to 120_n have not received an operation command CMD. Continuing the example above, when the count value CNT1 reaches a preset value, memory block SEG1 is considered a less frequently used memory block. Memory controller 120_1 is controlled to enter a power-saving mode. Therefore, the power consumption of memory controller 120_1 and memory block SEG1 can be reduced. Furthermore, other memory controllers may be in operating mode. In this way, during operation, the microcontroller 100 can reduce the power consumption of less frequently used memory controllers and memory blocks. In this embodiment, once an operation command CMD is received, the counting controller 130_1 resets the count value CNT1 to its initial count value and controls memory controller 120_1 to enter operating mode.

[0048] In this embodiment, memory controllers 120_1 to 120_n cease operation in power-saving mode. Therefore, memory blocks SEG1 to SEGn will not be subjected to at least one of the write, read, or refresh operations in power-saving mode. Memory blocks SEG1 to SEGn consume only the minimum power required to store data and prevent data loss in power-saving mode, but this invention is not limited thereto. In some embodiments, memory blocks SEG1 to SEGn are disabled. Therefore, memory blocks SEG1 to SEGn do not store data in power-saving mode.

[0049] In this embodiment, the microcontroller 100 further includes a processor 140 and a bus BS. The processor 140 can provide operation commands CMD to the memory controller 120_1 and the counter controller 130_1 via the bus BS, thereby enabling the memory controller 120_1 to operate on the memory block SEG1. The bus BS may be, for example, an AHB bus (this invention is not limited thereto). The processor 140 may be, for example, a central processing unit (CPU).

[0050] Please also refer to Figure 1 as well as Figure 2 , Figure 2 This is a flowchart of a memory control method according to an embodiment of the present invention. In this embodiment, the memory control method is applied to the internal memory circuit of a microcontroller 100. In step S110, the counting controllers 130_1 to 130_n count the number of times the memory clock CLK is executed to generate count values ​​CNT1 to CNTn. In step S120, the counting controllers 130_1 to 130_n determine whether the count values ​​CNT1 to CNTn have reached a preset value. Taking the counting controller 130_1 as an example, when the count value CNT1 has not yet reached the preset value, the counting controller 130_1 returns to step S110 to continue counting. When the count value CNT1 reaches the preset value, the counting controller 130_1 controls the memory controller 120_1 to enter a power-saving mode from the operating mode in step S130, thereby stopping the memory controller 120_1 from operating on the memory block SEG1.

[0051] When the counter controller 130_1 receives the operation command CMD between steps S110 and S120, the counter controller 130_1 resets the count value CNT1. The memory controller 120_1 remains in operation mode.

[0052] In step S140, the counter controller 130_1 determines whether an operation command CMD has been received. If no operation command CMD is received, the counter controller 130_1 returns to step S140 to continue waiting for the operation command CMD. That is, when the memory controller 120_1 is in power-saving mode, it will remain in power-saving mode if no operation command CMD is received. On the other hand, in step S140, when an operation command CMD is received, the counter controller 130_1 resets the count value CNT1 in step S150. In step S150, the counter controller 130_1 also controls the memory controller 120_1 to enter operation mode, enabling the memory controller 120_1 to operate on memory block SEG1 according to the operation command CMD.

[0053] The implementation details of the memory control method can be found in Figure 1 Sufficient teaching has been obtained from the embodiments, so it will not be repeated here.

[0054] Please also refer to Figure 1 as well as Figure 3 , Figure 3 This is a first timing diagram illustrated according to an embodiment of the present invention. The first timing diagram TD1 illustrates the timing of multiple signals controlling the memory controller 120_1 to enter a power-saving mode from an operating mode by the counter controller 130_1. In this embodiment, the counter controller 130_1 starts counting the number of times the memory clock CLK occurs at time t1 to generate a count value CNT1. In this embodiment, the counter controller 130_1 may count in response to the rising edge of the memory clock CLK. The counter controller 130_1 compares the count value CNT1 with a preset value. When the counter controller 130_1 determines that the count value CNT1 has reached the preset value, the counter controller 130_1 provides a control signal SC (i.e., a first control signal) with a first voltage level. The memory controller 120_1 enters the power-saving mode in response to the control signal SC with the first voltage level.

[0055] In this embodiment, the counter controller 130_1 counts the number of times the memory clock CLK is incremented. The preset value is set to "100". When it is determined that the count value CNT1 is greater than or equal to "100" at time t2, the counter controller 130_1 provides a control signal SC with a high voltage level at time t2. Therefore, the memory controller 120_1 will enter power-saving mode in response to the control signal SC with a high voltage level.

[0056] In some embodiments, after time point t2, the counting controller 130_1 will not count the memory clock CLK. That is, once the count value CNT1 reaches the preset value, the count value CNT1 will not change until the counting controller 130_1 receives the operation command CMD. In some embodiments, after time point t2, the counting controller 130_1 will continuously count the memory clock CLK.

[0057] Please also refer to Figure 1 as well as Figure 4 , Figure 4 This is a second timing diagram illustrated according to an embodiment of the present invention. The second timing diagram TD2 illustrates the timing when the count value CNT1 is reset. In this embodiment, when the counting controller 130_1 determines that the count value CNT1 has reached a preset value before receiving the operation command CMD, the counting controller 130_1 will reset the count value CNT1 and count based on the number of times the memory clock CLK has been used.

[0058] In this embodiment, the counting controller 130_1 counts the number of times the memory clock CLK is incremented. The preset value is set to "100". The counting controller 130_1 starts counting the number of times the memory clock CLK is counted at time point t3 to generate a count value CNT1. Between time points t4 and t5, the counting controller 130_1 receives an operation command CMD. Therefore, the counting controller 130_1 resets the count value CNT1 to the initial count value (e.g., "0") at time point t5 and continues counting based on the number of times the memory clock CLK is counted.

[0059] In some embodiments, the counter controller 130_1 identifies the signal. When the signal is identified as an operation command CMD, the counter controller 130_1 resets the count value CNT1 and counts based on the number of times the memory clock CLK is pressed.

[0060] Please also refer to Figure 1 as well as Figure 5 , Figure 5This is a third timing diagram illustrated according to an embodiment of the present invention. Third timing diagram TD3 illustrates the timing of multiple signals controlling the memory controller 120_1 from power-saving mode to operating mode by the counter controller 130_1. In this embodiment, before time point t6, the control signal SC has a first voltage level. The first voltage level is, for example, a high voltage level. Therefore, the memory controller 120_1 is in power-saving mode. Between time points t6 and t7, the counter controller 130_1 receives the operating command CMD. Therefore, at time point t7, the counter controller 130_1 provides the control signal SC (i.e., the second control signal) with a second voltage level. The second voltage level is, for example, a low voltage level. Therefore, the memory controller 120_1 responds to the control signal SC with the second voltage level to be woken up from power-saving mode, thereby entering operating mode.

[0061] In addition, at time point t7, the counting controller 130_1 resets the count value CNT1 to the initial count value (e.g., "0") and counts based on the number of times the memory clock CLK is used.

[0062] In the aforementioned first timing diagram TD1, second timing diagram TD2, and third timing diagram TD3, the count of the memory clock CLK is incremented. That is, during the counting process, the count value CNT1 is gradually increased. Once the count value CNT1 is increased to a preset value, the counting controller 130_1 controls the memory controller 120_1 to enter a power-saving mode. In some embodiments, the counting controller 130_1 may count the memory clock CLK in a decrementing manner. That is, during the counting process, the count value CNT1 is gradually decreased. Once the count value CNT1 is decreased to a preset value, the counting controller 130_1 controls the memory controller 120_1 to enter a power-saving mode. Figure 1 In one embodiment, counting controllers 130_1 to 130_n count the number of times the memory clock CLK is incremented to generate count values ​​CNT1 to CNTn. In another embodiment, counting controllers 130_1 to 130_n count the number of times the memory clock CLK is decremented to generate count values ​​CNT1 to CNTn. In yet another embodiment, some counting controllers of counting controllers 130_1 to 130_n count the number of times the memory clock CLK is incremented to generate count values. The remaining counting controllers of counting controllers 130_1 to 130_n count the number of times the memory clock CLK is decremented to generate count values.

[0063] Further details on the implementation of the memory controller and the counter controller are provided. Please refer to [link / reference needed]. Figure 6 , Figure 6This is a partial schematic diagram of a microcontroller according to a second embodiment of the present invention. In this embodiment, for ease of explanation, only components such as the bus BS, memory controller 220_1, and counter controller 230_1 are shown. In this embodiment, the counter controller 230_1 includes a counter 231, a register 232, and a decision circuit 233. The counter 231 receives the memory clock CLK and counts the number of times the memory clock CLK is pressed to generate a count value CNT1. The register 232 stores a preset value DV. The decision circuit 233 is coupled to the counter 231 and the register 232. The decision circuit 233 controls the mode of the memory controller 220_1 based on the count value CNT1 and the operation command CMD.

[0064] Furthermore, when the count value CNT1 is determined to have reached the preset value DV, the determination circuit 233 provides a first control signal SC1. Therefore, the memory controller 220_1 responds to the first control signal SC1 to enter a power-saving mode. In power-saving mode, the memory controller 220_1 does not operate on the corresponding memory block.

[0065] When the operation command CMD is received, the judgment circuit 233 provides the second control signal SC2. Therefore, the memory controller 220_1 responds to the second control signal SC2 to enter the operation mode. In the operation mode, the memory controller 220_1 receives the operation command CMD. If the operation command CMD is a write command, the memory controller 220_1 writes the data DTA to the specified address of the corresponding memory block according to the address ADD. If the operation command CMD is a read command, the memory controller 220_1 reads the data DTA from the specified address of the corresponding memory block according to the address ADD.

[0066] In this embodiment, the memory controller 220_1 includes a mode control circuit 221. The mode control circuit 221 responds to a first control signal SC1 to control the memory controller 220_1 to enter a power-saving mode. Furthermore, the mode control circuit 221 also responds to a second control signal SC2 to control the memory controller 220_1 to enter an operating mode.

[0067] In this embodiment, the counter controller 230_1 adjusts its initial count value based on the frequency at which the count value CNT1 is reset. For example, the counter 231 counts the number of times the memory clock CLK is incremented. When the frequency of resetting the count value CNT1 increases, it indicates that the memory block corresponding to the counter controller 230_1 is a more frequently used memory block. The counter controller 230_1 then decreases the initial count value. Therefore, the difference between the initial count value and the preset value DV becomes larger. As a result, the memory controller 220_1 reduces the frequency of switching between power-saving mode and operating mode, thereby avoiding a decrease in read efficiency. On the other hand, when the frequency of resetting the count value CNT1 decreases, it indicates that the memory block corresponding to the counter controller 230_1 is a less frequently used memory block. The counter controller 230_1 increases the initial count value. Therefore, the difference between the initial count value and the preset value DV becomes smaller. As a result, the memory controller 220_1 enters power-saving mode earlier, thereby improving power saving.

[0068] In this embodiment, the counter controller 230_1 adjusts the preset value DV stored in the cache 232 according to the frequency at which the count value CNT1 is reset. For example, the counter 231 counts the number of times the memory clock CLK is incremented. When the frequency at which the count value CNT1 is reset increases, it indicates that the memory block corresponding to the counter controller 230_1 is a more frequently used memory block. The counter controller 230_1 increases the preset value DV. Therefore, the difference between the initial count value and the preset value DV becomes larger. In this way, the memory controller 220_1 reduces the frequency of switching between power-saving mode and operating mode, thereby avoiding a decrease in read efficiency. On the other hand, when the frequency at which the count value CNT1 is reset decreases, the counter controller 230_1 decreases the preset value DV. Therefore, the difference between the initial count value and the preset value DV becomes smaller. In this way, the memory controller 220_1 enters power-saving mode earlier, thereby improving power saving.

[0069] In summary, the counter controller generates a count value based on the memory clock. When the count value reaches a preset value, the counter controller controls the corresponding memory controller to enter a power-saving mode. Therefore, the corresponding memory controller and the corresponding memory block will not operate. In this way, the power consumption of the corresponding memory controller and the corresponding memory block can be saved. Once an operation command is received, the counter controller resets the count value and controls the corresponding memory controller to enter the operation mode. In this way, the microcontroller can reduce the power consumption of infrequently used memory controllers and memory blocks during operation. In addition, the preset value can be adjusted according to the frequency of count value reset. Therefore, the memory controller corresponding to more frequently used memory blocks will reduce the frequency of switching between power-saving mode and operation mode, thereby avoiding a decrease in read efficiency.

[0070] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A microcontroller, characterized in that, The microcontroller includes: A memory array, comprising multiple memory blocks; Multiple memory controllers, correspondingly coupled to the multiple memory blocks, each configured to operate on a corresponding memory block among the multiple memory blocks in an operating mode; and Multiple counting controllers, correspondingly coupled to the multiple memory controllers, are each configured as follows: The count is generated based on the memory clock. When the count value reaches a preset value, the corresponding memory controller among the plurality of memory controllers is controlled to enter a power-saving mode to stop operating on the corresponding memory block, and When an operation command is received, the counter value is reset and the corresponding memory controller is controlled to enter the operation mode. The first counting controller among the plurality of counting controllers includes: A counter, configured to receive the memory clock and increment the count of the memory clock cycles to generate the count value; and A buffer, configured to store the preset value, When the frequency at which the count value is reset increases, the first counting controller increases the preset value, and When the frequency at which the count value is reset decreases, the first count controller reduces the preset value.

2. The microcontroller according to claim 1, characterized in that, The first counting controller further includes: A decision circuit, coupled to the counter and the register, is configured to control the mode of the first memory controller among the plurality of memory controllers based on the count value and the operation command.

3. The microcontroller according to claim 2, characterized in that, When the operation command is received, the first counting controller resets the count value and counts based on the number of times the memory clock is turned.

4. The microcontroller according to claim 3, characterized in that, In the operating mode, the first memory controller receives the operation command and responds to the operation command to perform at least one of a write operation, a read operation, and a refresh operation on the corresponding memory block.

5. The microcontroller according to claim 4, characterized in that: When the count value reaches the preset value, the judgment circuit provides a first control signal, and the first memory controller responds to the first control signal to enter the power-saving mode. When the operation command is received, the judgment circuit provides a second control signal, and the first memory controller responds to the second control signal to enter the operation mode.

6. The microcontroller according to claim 5, characterized in that, The first memory controller includes: A mode control circuit is configured to respond to the first control signal to control the first memory controller to enter the power-saving mode, and to respond to the second control signal to control the first memory controller to enter the operating mode.

7. A memory control method for controlling the internal memory of a microcontroller, characterized in that, The microcontroller includes a memory array, multiple memory controllers, and multiple counter controllers. The memory array includes multiple memory blocks, and the multiple memory controllers are correspondingly coupled to the multiple memory blocks. The multiple counter controllers are correspondingly coupled to the multiple memory controllers. The memory control method includes: The memory clock is received by the multiple counting controllers, and the number of times the memory clock is counted in an incremental manner to generate a count value; The preset value is increased when the frequency of resetting the count value increases, and the preset value is decreased when the frequency of resetting the count value decreases. When the count value of the corresponding counter controller among the plurality of counter controllers reaches the preset value, the corresponding memory controller among the plurality of memory controllers is controlled to enter a power-saving mode to stop operating on the corresponding memory block among the plurality of memory blocks; and When the corresponding counter controller receives an operation command, it resets the counter value and controls the corresponding memory controller to enter the operation mode, so that the corresponding memory controller can operate on the corresponding memory block according to the operation command.

8. The memory control method according to claim 7, characterized in that, When the count value of the corresponding counter controller reaches the preset value, the step of controlling the corresponding memory controller to enter the power-saving mode includes: The corresponding counting controller provides a first control signal; and The corresponding memory controller responds to the first control signal to enter the power-saving mode.

9. The memory control method according to claim 7, characterized in that, When the corresponding counter controller receives the operation command, the steps of resetting the counter value and controlling the corresponding memory controller to enter the operation mode include: The corresponding counting controller provides a second control signal; and The corresponding memory controller responds to the second control signal to enter the operation mode.

Citation Information

Patent Citations

  • Method and apparatus for memory control system

    CN113539309A

  • Techniques for entry to a lower power state for a memory device

    US20170115916A1

  • Power saving system for a memory controller

    US5473572A