docs: update wear levelling cn trans

This commit is contained in:
intern 2022-02-21 15:29:24 +08:00
parent c04803e88b
commit 89bec6cd27
2 changed files with 5 additions and 3 deletions

View File

@ -5,6 +5,7 @@ Wear Levelling API
Overview
--------
Most of flash memory and especially SPI flash that is used in {IDF_TARGET_NAME} has a sector-based organization and also has a limited number of erase/modification cycles per memory sector. The wear levelling component helps to distribute wear and tear among sectors more evenly without requiring any attention from the user.
The wear levelling component provides API functions related to reading, writing, erasing, and memory mapping of data in external SPI flash through the partition component. The component also has higher-level API functions which work with the FAT filesystem defined in :doc:`FAT filesystem </api-reference/storage/fatfs>`.
@ -17,12 +18,12 @@ To save internal memory, the component has two additional modes which both use s
- **Safety mode.** The data is first saved to flash memory, and after the sector is erased, the data is saved back. If a device is powered off, the data can be recovered as soon as the device boots up.
The default settings are as follows:
- Sector size is 512 bytes
- Performance mode
You can change the settings through the configuration menu.
The wear levelling component does not cache data in RAM. The write and erase functions modify flash directly, and flash contents are consistent when the function returns.
@ -46,4 +47,3 @@ Memory Size
-----------
The memory size is calculated in the wear levelling module based on partition parameters. The module uses some sectors of flash for internal data.

View File

@ -6,7 +6,7 @@
概述
--------
ESP32 所使用的 flash特别是 SPI flash 多数具备扇区结构,且每个扇区仅允许有限次数的擦除/修改操作。为了避免过度使用某一扇区,乐鑫提供了磨损均衡组件,无需用户介入即可帮助用户均衡各个扇区之间的磨损。
{IDF_TARGET_NAME} 所使用的 flash特别是 SPI flash多数具备扇区结构,且每个扇区仅允许有限次数的擦除/修改操作。为了避免过度使用某一扇区,乐鑫提供了磨损均衡组件,无需用户介入即可帮助用户均衡各个扇区之间的磨损。
磨损均衡组件包含了通过分区组件对外部 SPI flash 进行数据读取、写入、擦除和存储器映射相关的 API 函数。磨损均衡组件还具有软件上更高级别的 API 函数,与 :doc:`FAT 文件系统 </api-reference/storage/fatfs>` 协同工作。
@ -26,6 +26,7 @@ ESP32 所使用的 flash特别是 SPI flash 多数具备扇区结构,且每
磨损均衡组件不会将数据缓存在 RAM 中。写入和擦除函数直接修改 flash函数返回后flash 即完成修改。
磨损均衡访问 API
-----------------------------------
@ -41,6 +42,7 @@ ESP32 所使用的 flash特别是 SPI flash 多数具备扇区结构,且每
请尽量避免直接使用原始磨损均衡函数,建议您使用文件系统特定的函数。
内存大小
-----------