MTKAbout storageSystemThe application tutorial is the content to be introduced in this article, mainly to understand and learn how to store in MTKSystemOperations in, aboutMTKFor detailed application in.
Neither NOR are flash data lost.
Flash is divided into two parts: code area and fileSystemArea scoreSystemDisk and user disk ).
NVRAM is a set of mechanisms, and its data part: the default has the flash code area, and the NARAM file has the file system area system disk)
The phone book data is stored in the system disk of the file system area in the form of NVRAM files), and the phone book of the SIM card is on the SIM card.
The tcard is an extended flash and is a file system zone.
What is the difference between NANDflash, NORflash, and general flash?
NOR and NAND are two major non-loss flash technologies on the market. Intel first developed the NORflash Technology in 1988, which completely changed the previous situation where EPROM and EEPROM were integrated. Next, in 1989, Toshiba published the NANDflash structure, emphasizing reducing the cost per bit and higher performance, and easily upgrading it through interfaces like disks. However, after more than a decade, a considerable number of hardware engineers are still confused about NOR and NAND Flash.
Flash memory can often be used with NOR memory. Many insiders do not know the advantages of NAND Flash compared with NOR, because in most cases, Flash is only used to store a small amount of code, so NOR flash is more suitable for some. NAND is an ideal solution for high data storage density.
NOR is characterized by XIP (eXecuteInPlace) in the chip, so that applications can run directly in flash memory without having to read the code into system RAM.
NOR transmission efficiency is very high, in 1 ~ The small size of 4 MB has high cost efficiency, but the low write and erase speeds greatly affect its performance.
The NAND structure provides a very high unit density, achieves a high storage density, and writes and erases quickly. The difficulty of using NAND lies in flash management and special requirements.SystemInterface.
What does MTKFLASH mean by 64 + 32?
Mobile phone MCP chip models, mainly used to accelerate image processing capabilities
64 + 32, 128 + 32, 128 + 64, 256 + 64, 1G + 256, 1G + 512 series FLASH, widely used in MTK6225, 6235 platforms, the main origin is toshba Japan
Most mobile phone memory is two-in-one, that is, FLASH and SRAM packages are in the same chip. 64 + 32 refers to the SRAM of 8Mbyte64Mbit) NORFLASH + 4Mbyte32Mbit. The same applies to 128 + 32.
ROM is a read-only memory. After power failure, data will not be lost. Generally, important data is guaranteed.
RAM is a random memory, and data will be lost after power failure.
ROM and RAM refer to semiconductor memory. The original meaning is: ROM refers to ReadOnlyMemory, which means that this memory can only be read and cannot be written. RAM is short for RandomAccessMemory. This term originated from the fact that some computers used magnetic drums as memory, and magnetic drums and tapes were typical sequential read/write devices. RAM can be read and written randomly.
ROM usually refers to non-volatile memory, or does not power down. When the system stops power supply, they can still maintain data. So the CD also has a CD-ROM or DVD-ROM. RAM usually does not have data after it is powered. It is typically like the memory of a computer. It needs to be reloaded from the hard disk when the system restarts. Sometimes, if the data can be erased, will also borrow the concept of RAM, such as DVD-RAM, in fact, only can erase the DVD disc, not the real semiconductor memory
Differences between smartphone ROM and RAM
Memory is divided into random Memory RAM) and read-only memory ROM. ROM is usually used to solidify and store the program or data written by some manufacturers, and is used to start and control the computer. RAM is used to access various dynamic input and output data, intermediate computing results, data exchanged with external storage, and temporary data. After a device is powered off, data stored in RAM is lost.
For mobile phones
The speed of running games and programs depends on RAM, that is, dynamic memory, rather than ROM. ROM is a static space used to store things, which is equivalent to the Z drive of the mobile phone. RAM and ROM are like the memory and hard disk of a computer. Disk C should not be called ROM read-only memory accurately. Drive C should be called FLASH, because drive C is erasable, and the FLASH size does not affect the running speed.
128 bitM = 16 Mb is generally divided into 14 Mb resource zones, including images, strings, NVRAM, etc.
There are also 2 MB of useful ARM boot and some memory, and the running speed is quite fast. Hard Disk equivalent to PC
32 sdrambitM = 4 MB, generally used to store dynamic memory, global variables, or something, is equivalent to PC memory.
The default mtk25 platform is 128Mbitflashmemory and 32 MbitSRAM. Because 1 byte is equal to 8 bit, we usually call 16 mrom and 4 MRAM. However, because the file system occupies 2 MB, these 2 m disks are generally divided into system disks and user disks. The system disks store NV files and MMS-related files, which are invisible to users. Users can connect to the computer to view these files. However, for some reasons, many mobile phones do not have user disks. If the user disk is too large, some modules such as MMS may be unstable. Therefore, many users do not have user disks when using NORFALSH, however, NANDFALSH generally sets user disks. If you need to set this parameter, you only need to modify the macro PARTITION_SIZE value. The declaration part of the memory file shows that in the SCAT file, there is a row of SCHEME: external14MBflashmemoryand4MBSRAM, that is, 14MROM and 4 MRAM.
Due to different user requirements, sometimes we will modify the RAM and ROM sizes. Generally, we need to modify the SCAT file accordingly. In the SCAT file, we can see the row ROM0x000000000x00e00000, that is, the available ROM starts from 0x00000000 and ends at 0x00e00000, totaling 0x00e00000 bytes, the following shows that these ROM segments are divided into four 4 m segments. At EXTSRAM_LARGEPOOL_NORMAL0x08000000 of the SCAT row, we can see the usage of RAM. The address starts from 0x08000000 and ends at 0x08400000. A total of 0x00400000BYTE, that is, 4 MBYTE, modify ROM0x000000000x00e00000
- ROM0x000000000x01c00000,
- Modify
- Dummy_end0x0840020.x04
- Is
- DUMMY_END0x088000000x04,
With this modification, the current ROM and RAM are two times the default size.
In fact, sometimes RAM is not necessarily required to be implemented by adding RAM when it is insufficient, which is costly. You can use reusable memory or save a lot of memory. In the SCAT file, we can often see the Guan jianzi overlay, which is a composite memory used by some mobile phone applications to save memory. For example, INTSRAM_MULTIMEDIA0x400000000xC000 declares the starting address of the memory reused by MED, as long as there is no conflict, this is almost the best solution to memory shortage. If the ROM is exceeded, it may be more troublesome. Remove unnecessary images and music, reduce the image quality, and remove unnecessary functions, converting macro functions into common functions can save some ROM.
If an error occurs when the RAM or ROM encoding fails, the system prompts that the ROM has exceeded or the RAM has exceeded the size of the excess part, and then finds a solution based on the calculated size. The calculation method is to open the LIS file, add up the RAM or ROM, minus 14 or 4, the number of bytes exceeds, that is, the memory size to be adjusted
- ================================================================================
- CodeRODataRWDataZIDataDebug
- 659753674487325205642667053730676GrandTotals
- ================================================================================
- TotalROSize(Code+ROData)14046268(13717.06kB)
- TotalRWSize(RWData+ZIData)4318761(4217.54kB)
- TotalROMSize(Code+ROData+RWData)14098324(13767.89kB)
- ================================================================================
The RAM size seems to exceed 4M4318761?
Memory Reuse
To learn about RO, RW, and ZI, you must first understand the following knowledge:
(1) ARM Program Composition
The "ARM Program" here refersSystemPrograms being executed, rather than bin image files stored in the ROM.
An ARM program contains three parts: RO, RW, and ZI.
RO is the instruction and constant in the program.
RW is the initialized variable in the program.
ZI is an uninitialized variable in the program.
The above three points can be understood:
RO is readonly,
RW is read/write,
ZI is zero.
(2) Composition of ARM image files
The so-called ARM image file refers to the binary file burned into the ROM and also becomes an image file. The following is called an Image file.
The Image file contains RO and RW data.
The reason why the Image file does not contain the ZI data is that the ZI data is 0 and does not need to be included. You only need to clear the region where the ZI data is located before running the program. It wastes storage space.
Q: Why must Image contain RO and RW?
A: The commands and constants in RO and the initialized variables in RW cannot be "born out of nothing" like ZI.
(3) Execution Process of ARM Program
From the above two points, we can know that the image file burned to the ROM is not exactly the same as the actual running ARM program. Therefore, it is necessary to understand how the ARM Program reaches the actual running state from the image in the ROM.
In fact, the commands in ROM should have at least the following functions:
1. Move RW from ROM to RAM. Because RW is a variable, the variable cannot exist in ROM.
2. Clear all the RAM regions where ZI is located. Because the ZI region is not in the Image, the program needs to clear the desired RAM region based on the ZI address and size given by the compiler. ZI is also a variable. Similarly, the variable cannot exist in ROM.
At the initial stage of the program running, the C program can access the variables normally after the commands in RO Have completed these two tasks. Otherwise, only codes without variables can be run.
Summary:MTKAbout storageSystemThe content of the application tutorial is complete.MTKMedium storageSystemContent learning is helpful to you!