Search

CN-121996141-A - Flash memory controller, control method of flash memory controller and electronic device using flash memory controller

CN121996141ACN 121996141 ACN121996141 ACN 121996141ACN-121996141-A

Abstract

The invention discloses a flash memory controller which is used for accessing a flash memory module. The flash memory controller includes a buffer memory and a microprocessor. A portion of the buffer memory is used to temporarily store the write read command code associated with processing a write or read in the system internal code. The microprocessor sets a partial area of the buffer memory as a holding memory, and sets the partial area of the buffer memory as a non-holding memory when receiving a start-stop unit command representing entering a sleep mode or a shutdown mode, and the flash memory controller enters a power saving mode and closes the non-holding memory after receiving the sleep command. The invention also discloses a control method of the flash memory controller and an electronic device applied by the same.

Inventors

  • CHEN ZHIXIAO

Assignees

  • 深圳市欣芯半导体有限公司

Dates

Publication Date
20260508
Application Date
20241101

Claims (11)

  1. 1. A flash memory controller for accessing a flash memory module, comprising: A buffer memory for temporarily storing a system internal program code, and a part of the buffer memory for temporarily storing a write-read command program code associated with processing writing or reading in the system internal program code, and A microprocessor for executing the system internal program code to control access to the flash memory module; the microprocessor sets the partial area of the buffer memory as a holding memory, and sets the partial area of the buffer memory as a non-holding memory when receiving a start-stop unit command representing entering a sleep mode or a shutdown mode, and the flash memory controller enters the power saving mode and closes the non-holding memory after receiving a sleep command.
  2. 2. The flash memory controller of claim 1 wherein the start-stop unit command is sent by a host device.
  3. 3. The flash memory controller of claim 1, wherein when the flash memory controller enters an operating mode from the power saving mode, the microprocessor reads the write read command program code associated with processing a write or read from the system internal program code from the flash memory module to the partial area of the buffer memory.
  4. 4. The flash memory controller of claim 3, wherein after the flash memory controller enters the operating mode from the power saving mode, the microprocessor sets the partial area of the buffer memory to the holding memory or the non-holding memory according to whether the start-stop unit command representing entering the sleep mode or the power-off mode is received.
  5. 5. An electronic device, comprising: A flash memory module, and A flash memory controller for accessing the flash memory module, wherein the flash memory controller comprises: A buffer memory for temporarily storing a system internal program code, and a part of the buffer memory for temporarily storing a write-read command program code associated with processing writing or reading in the system internal program code, and A microprocessor for executing the system internal program code to control access to the flash memory module; the microprocessor sets the partial area of the buffer memory as a holding memory, and sets the partial area of the buffer memory as a non-holding memory when receiving a start-stop unit command representing entering a sleep mode or a shutdown mode, and the flash memory controller enters the power saving mode and closes the non-holding memory after receiving a sleep command.
  6. 6. The electronic device of claim 5, wherein the start-stop unit command is sent by a host device.
  7. 7. The electronic device of claim 5, wherein when the flash memory controller enters an operating mode from the power saving mode, the microprocessor reads the write read command program code associated with processing a write or read from the flash memory module to the partial area of the buffer memory.
  8. 8. The electronic device of claim 7, wherein the microprocessor sets the partial area of the buffer memory to the holding memory or the non-holding memory according to whether the start-stop unit command representing entering the sleep mode or the shutdown mode is received after the flash memory controller enters the operation mode from the power saving mode.
  9. 9. A control method of a flash memory controller, wherein the flash memory controller is used for accessing a flash memory module, the control method of the flash memory controller comprises: Setting a part of the area of the program code of the write-read command associated with processing writing or reading in the internal program code of the temporary storage system in a buffer memory as a holding memory; Judging whether a start-stop unit command representing entering a sleep mode or a shutdown mode is received; setting the partial area of the buffer memory as a non-holding memory when receiving the start-stop unit command representing entering the sleep mode or the shutdown mode, and After receiving a sleep command, the flash memory controller enters the power saving mode and closes the non-holding memory.
  10. 10. The method for controlling a flash memory controller according to claim 9, further comprising: When the flash memory controller enters a working mode from the power saving mode, the microprocessor reads the write-read command program code which is associated with processing writing or reading in the system internal program code from the flash memory module to the partial area of the buffer memory.
  11. 11. The method for controlling a flash memory controller according to claim 9, further comprising: when the flash memory controller enters the working mode from the power saving mode, the microprocessor sets the partial area of the buffer memory as the holding memory or the non-holding memory according to whether the microprocessor receives the start-stop unit command representing entering the sleep mode or the shutdown mode.

Description

Flash memory controller, control method of flash memory controller and electronic device using flash memory controller Technical Field The present invention relates to the field of computer technologies, and in particular, to a flash memory controller and a control method thereof. Background Flash memory (Flash memory) belongs to non-volatile solid-state storage memory, and is widely applied to memory cards and portable discs, and is also widely applied to mobile electronic devices in recent years. In use, the flash memory is typically used in conjunction with a flash memory controller to manage data stored in the flash memory and communicate with a computer or electronic device. The flash Memory controller typically enters a power saving mode when it does not receive an Access command from the host device, and turns off a Static Random-Access Memory (SRAM) power supply to save power consumption. Since a portion of the sram is turned off, a portion of the system internal program code (In-System Programming (ISP) that is originally stored therein is lost, and therefore, when the flash memory controller enters the operation mode from the power saving mode, it is necessary to read the ISP code from the flash memory module again to the sram, and then the access command of the host device can be normally received and the flash memory module can be accessed. However, since the amount of data of the ISP code is large, the flash memory controller needs more time to read the ISP code, which results in that the flash memory controller needs longer time to process the access command from the host device when leaving the power saving mode, thereby reducing the performance of the overall system. Therefore, it is an important object to provide a flash memory controller, a control method of the flash memory controller and an electronic device using the same, which can improve the above problems. Disclosure of Invention In order to achieve the above-mentioned object, the present invention provides a flash memory controller, a control method of the flash memory controller and an electronic device using the same, which can set a specific area in a buffer memory to be a memory before the flash memory controller enters a power saving mode, so as to avoid the program code temporarily stored in the memory from being disappeared when entering the power saving mode under specific conditions. The invention provides a flash memory controller which is used for accessing a flash memory module. The flash memory controller comprises a buffer memory and a microprocessor. The buffer memory is used for temporarily storing a system internal program code, and a part of the area of the buffer memory is used for temporarily storing a write-read command program code associated with processing writing or reading in the system internal program code. The microprocessor is used for executing system internal program codes to control the access to the flash memory module. The microprocessor sets a partial area of the buffer memory as a retention memory (save memory), and sets the partial area of the buffer memory as a non-retention memory (non-retention memory) when receiving a start-stop unit (SSU) command representing entering a sleep mode or a shutdown mode, and after receiving a sleep command, the flash memory controller enters a power saving mode and shuts down the non-retention memory. In one embodiment, the Start stop Unit command is sent by a host device. In one embodiment, when the flash memory controller enters a working mode from a power saving mode, the microprocessor reads the write-read command program code associated with processing the write or read from the internal program code of the system from the flash memory module to a partial area of the buffer memory. In one embodiment, after the flash memory controller enters the working mode from the power saving mode, the microprocessor sets a partial area of the buffer memory to the holding memory or the non-holding memory according to whether a start-stop unit command representing entering the sleep mode or the shutdown mode is received. In addition, the invention also provides an electronic device which comprises a flash memory module and a flash memory controller which are electrically connected with each other. The flash memory controller is used for accessing the flash memory module and comprises a buffer memory and a microprocessor. The buffer memory is used for temporarily storing a system internal program code, and a part of the area of the buffer memory is used for temporarily storing a write-read command program code associated with processing writing or reading in the system internal program code. The microprocessor is used for executing system internal program codes to control the access to the flash memory module. The microprocessor sets the partial area of the buffer memory as a holding memory, and sets the partial area of the buffer memory as a non-holding memory when rece