Electronic device, control method thereof and storage medium
First Claim
1. An electronic device having a flash memory, comprising:
- management means dividing a sector of said flash memory indicative of an erase unit into a plurality of blocks, having an area for storing code data indicative of whether data stored in each block is effective or ineffective, and having file management data for managing a file by one or a plurality of blocks;
first erase means for writing an ineffective code in the area of each block constructing the file, when an erase request for erasing a file stored in said flash memory is inputted;
transfer means for transferring, sector by sector, effective blocks of the sector except blocks storing an ineffective code, to a predetermined volatile memory at a predetermined timing, while maintaining a relative position of a storage address of each effective block;
second erase means for erasing a sector of interest in the flash memory after transfer operation is performed by said transfer means; and
write means for writing the effective blocks, which have been transferred to the volatile memory, in the erased sector while maintaining the relative position of the storage address of each effective block.
1 Assignment
0 Petitions
Accused Products
Abstract
To erase data stored in a flash memory at high speed with simple processing and to improve operation environment, a file stored in the flash memory is managed by small blocks smaller than a rewriting unit, and small blocks are linked to each other so that a file having a size of plural blocks can be constructed. When a file erase command is inputted, an ineffective code is written in an area indicative of effectiveness/ineffectiveness of each block which constructs the file subjected to erasing. Writing an ineffective code is easily realized, without erasing the flash memory, by changing at least one bit of the effective code from “1” to “0”. When the set time comes, blocks storing ineffective codes are organized.
-
Citations
12 Claims
-
1. An electronic device having a flash memory, comprising:
-
management means dividing a sector of said flash memory indicative of an erase unit into a plurality of blocks, having an area for storing code data indicative of whether data stored in each block is effective or ineffective, and having file management data for managing a file by one or a plurality of blocks;
first erase means for writing an ineffective code in the area of each block constructing the file, when an erase request for erasing a file stored in said flash memory is inputted;
transfer means for transferring, sector by sector, effective blocks of the sector except blocks storing an ineffective code, to a predetermined volatile memory at a predetermined timing, while maintaining a relative position of a storage address of each effective block;
second erase means for erasing a sector of interest in the flash memory after transfer operation is performed by said transfer means; and
write means for writing the effective blocks, which have been transferred to the volatile memory, in the erased sector while maintaining the relative position of the storage address of each effective block. - View Dependent Claims (2, 3, 4, 5, 6)
said block further includes information which indicates whether or not there is a subsequent block and which specifies an existing sector, address information indicating a storage position in the sector, and actual data. -
3. The electronic device according to claim 1, wherein the erase request is instructed externally.
-
4. The electronic device according to claim 1, wherein the predetermined timing is the time set in advance.
-
5. The electronic device according to claim 1, wherein the ineffective code stored in said block is a code where at least one bit of the effective code is changed to “
- 0”
.
- 0”
-
6. The electronic device according to claim 1, wherein said electronic device is a digital camera.
-
-
7. A control method of an electronic device having a flash memory, comprising:
-
a management step of dividing a sector of said flash memory indicative of an erase unit into a plurality of blocks, having an area for storing code data indicative of whether data stored in each block is effective or ineffective, and having file management data for managing a file by one or a plurality of blocks;
a first erase step of writing an ineffective code in the area of each block constructing the file, when an erase request for erasing a file stored in said flash memory is inputted;
a transfer step of transferring, sector by sector, effective blocks of the sector except blocks storing an ineffective code, to a predetermined volatile memory at a predetermined timing, while maintaining a relative position of a storage address of each effective block;
a second erase step of erasing a sector of interest in the flash memory after transfer operation is performed by said transfer step; and
a write step of writing the effective blocks, which have been transferred to the volatile memory, in the erased sector while maintaining the relative position of the storage address of each effective block.
-
-
8. A storage medium storing program codes which are read and executed by a computer, to function as an electronic device comprising a flash memory, said storage medium comprising:
-
program codes for management means dividing a sector of said flash memory indicative of an erase unit into a plurality of blocks, having an area for storing code data indicative of whether data stored in each block is effective or ineffective, and having file management data for managing a file by one or a plurality of blocks;
program codes for first erase means for writing an ineffective code in the area of each block constructing the file, when an erase request for erasing a file stored in said flash memory is inputted;
program codes for transfer means for transferring, sector by sector, effective blocks of the sector except blocks storing an ineffective code, to a predetermined volatile memory at a predetermined timing, while maintaining a relative position of a storage address of each effective block;
program codes for second erase means for erasing a sector of interest in the flash memory after transfer operation is performed by said transfer means; and
program codes for write means for writing the effective blocks, which have been transferred to the volatile memory, in the erased sector while maintaining the relative position of the storage address of each effective block.
-
-
9. An electronic device having a flash memory, comprising:
-
management means dividing a sector of said flash memory indicative of an erase unit into a plurality of blocks, having in each block a status area storing code data indicative of whether data stored in the block is effective or ineffective, and having management data of a file for managing the file by one or a plurality of blocks; and
erase means for writing an ineffective code over an effective code in the status area of each block constructing a specific file stored in said flash memory, without changing data in other areas of the block, when an erase request for erasing the specific file is inputted. - View Dependent Claims (10)
-
-
11. A control method of an electronic device having a flash memory, comprising:
-
a management step of dividing a sector of said flash memory indicative of an erase unit into a plurality of blocks, having in each block a status area storing code data indicative of whether data stored in the block is effective or ineffective, and having management data of a file for managing the file by one or a plurality of blocks; and
an erase step of writing an ineffective code over an effective code in the status area of each block construction a specific file stored in said flash memory, without changing data in other areas of the block, when an erase request for erasing the specific file is inputted.
-
-
12. A storage medium storing program codes which re read and executed by a computer, to furnish as an electronic device comprising a flash memory, said storage medium comprising:
-
program codes for management means for dividing a sector of said flash memory indicative of an erase unit into a plurality of blocks, having in each block a status area storing code data indicative of whether data stored in the block is effective or ineffective, and having management data of a file for managing the file by one or a plurality of blocks; and
program codes for erase means for writing an ineffective code over an effective code in the status area of each block constructing a specific file stored in said flash memory, without changing data in other areas of the block, when an erase request for erasing the specific file is inputted.
-
Specification