Raw flash vs. FTL devices, ubi

MT29F4G08 NAND Flash驱动开发全解析:从物理架构到Linux适配实战 NAND Flash作为一种主流的非易失性存储介质,以其高密度、低成本的优势广泛应用于嵌入式系统、消费电子和工业控制领域。其核心原理基于浮栅晶体管存储电荷,通过复杂的地址复用机制访问由页、块、平面构成的立体存储阵列。这种结构带来了高容量,但也引入了必须由软件管理的特性,如坏块管理和ECC校验,以确保数据可靠性。在工程实践中,驱动开发者需要精确控制命令时序、配置硬件控制器,并适配文件系统层。本文以经典的SLC NAND芯片MT29F4G08为例,深入剖析其物理架构、操作时序,并重点结合全志T113平台,详解在 阅读详情

Raw flash vs. FTL devices

FTL stands for "Flash Translation Layer" and it is software which emulates a block device on top of flash hardware. At early days FTL ran on the host computer. For example, old PCMCIA flash devices were essentially raw flash devices, and the PCMCIA standard defined the media storage format for them. So the host computer had to run the FTL software driver which implemented PCMCIA FTL. However, nowadays FTL is usually firmware, and it is run by the controller which is built into the storage device. For example, if you look inside an USB flash drive, you'll find there a NAND chip (or several of them), and a micro-controller, which runs FTL firmware. Some USB flash drives are known to have quite powerful ARM processors inside. Similarly, MMC, eMMC, SD, SSD, and other FTL devices have a built-in controller which runs FTL firmware.

All FTL devices have an interface which provides block I/O access. Well, the interfaces are different and they are defined by different specifications, e.g., MMC, eMMC, SD, USB mass storage, ATA, and so on. But all of them provide block-based access to the device. By block-based access we mean that whole device is represented as an linear array of (usually 512-byte) blocks. Each block may be read or written.

Linux has an abstraction of a block device. For example hard drives are block devices. Linux has many file systems and the block I/O subsystem, which includes elevators and so on which have been created to work with block devices (historically - hard drives). So the idea is that the same software may be used with FTL devices. For example, you may use FAT file system on your MMC card, or ext3 file system or your SSD.

Although most flashes on the commodity hardware have FTL, there are systems which have bare flashes and do not use FTL. Those are mostly various handheld devices and embedded systems. Raw flash devices are very different to block devices. They have different work model, they have tighter constraints and more issues than block devices. In case of FTL devices these constraints and issues are hidden, but in case of raw flash the software has to deal with them. Please refer to this table for some more details about the difference between block devices and raw flashes.

UBIFS file system has been designed for raw flash. It doesn't work with block devices and it assumes the raw flash device model. In other words, it assumes the device has eraseblocks, which may be written to, read from, or erased. UBIFS takes care of writing all data out-of-place, doing garbage-collection and so on. UBIFS utilizes UBI, which is doing stuff like wear-leveling and bad eraseblock handling. All these things are not normally needed for block devices.

Very often people ask questions like "why would one need to use raw flash and why not just use eMMC, or something like this?". Well, there is no simple answer, and the following is what UBIFS developers think. Please, take into account the date of this writing (3 May 2009). The answer is given in form of a list of non-structured items, and the reader should structure it in a way which is appropriate for his system. And because mass storage systems mostly use NAND flash (modern FTL devices also have NAND flash arrays inside), we talk specifically about NAND flashes. Also, we'd like to emphasize that we do not give general recommendations and everything depends on system requirements.

  • Bare NAND chips are cheaper and simpler, which is very important for small system. However, it seems like the industry pushes FTL devices forward and the situation is not that simple and obvious anymore. Indeed, an FTL device is more complex than a raw NAND of similar size, because an FTL device has an additional controller inside, and so on. But since the industry tends to produce a lot of FTL devices, and actually sell a lot of them, the price is going down.
  • If you need a flash storage where you are going to use FAT file system, then in most cases you should stick with an FTL device (eMMC, MMC, SD or whatever). Just make sure the FTL device is doing proper wear-leveling.
  • The other situation is when you are going to use your FTL device for system storage (e.g. for rootfs) and use a more robust file system like ext3. In this situation you should take into account various system requirements like tolerance to sudden power cuts. The following items are mostly related to system storage situations.
  • FTL devices are "black boxes". FTL algorithms are normally vendor secrets. But we know that NAND flash has issues like wear-leveling, bad blocks handling, read-disturb and so on. And it is important to get them right, especially in case of MLC NAND flash, which may have very short eraseblock life-time (e.g., only 1000 erase-cycles). But because FTL algorithms are closed, it is difficult to be sure whether a specific FTL device gets everything right or not.
  • If you start thinking about how FTL could be implemented, you realize that it must do things like garbage collection (sometimes referred to as "reclaim process"). And flash hardware pretty much requires most writes to be out-of-place. But how does FTL behave in case of sudden power-cuts? What if a power-cut happens while it is in the middle of doing garbage collection? Does the FTL device guarantee that the data which was on the flash media before the power cut happens will not disappear or become corrupted?
  • The power-cut tolerance may be tested, while it is quite difficult to test stuff like wear-leveling or read-disturb handling, because it may require too much time.
  • We have heard reports that some USB flash drives wear out very quickly, i.e., they start reporting I/O errors after few weeks of intensive use. This means that FTL does not do proper wear-leveling. This does not mean that all USB flash drives are bad - just that you should be careful.
  • We have heard reports that MMC, eMMC, and SD cards corrupt and lose data if power is cut during writing. Even the data which were there long time before may corrupt or disappear. This means that they have bad FTL which does not do things properly. But again, this does not have to be true for all MMCs/eMMCs and SDs - there are many different vendors. Be careful, though.
  • In general, if you glance back into the history, many FTL devices were mostly used with FAT file system for storing stuff like photo and video. FAT file system is not reliable by definition, which suggests that FTL devices may also be not very reliable, just because historically this was not really required. Indeed, it is not a big deal to lose a couple of photos. However, it is crucial to make sure that system libraries do not corrupt because of power-cuts.
  • Good FTL must be a rather complex piece of software, especially if it deals with MLC NAND (which is used in most modern mass storage devices). Implementing it in firmware might be a difficult task, and running it might require a powerful controller. Instead, we suspect that vendors may user various tricks or compromises to keep their devices "good enough" and cheap. For example, it is known that some vendors optimize their FTL devices for FAT, and if you start using ext3 on top of one, you might face some unexpected problems or the device may become worse than you would imagine. Of course, it is often difficult to verify this with closed FTL.
  • SSD drives are probably very different to eMMC, MMC/SD etc. We have not worked with SSD drives. They are expensive and probably have powerful CPUs that run complex firmware which probably gets things right.
  • FTL devices are becoming more popular and better, although it is not easy to distinguish between good and bad FTL devices (of course vendors would assure you their device is perfect). Generally, there is nothing wrong in using an FTL device as long as you trust it, you have tested it, or it simply fits your system requirements.
  • In case of raw flash we know exactly what we are doing. UBI/UBIFS handles all aspects of NAND flash like bad erase-blocks and wear-leveling. It guarantees power-cut tolerance. It is open and available, so you may always validate, test, and fix it. There is no lie about what it can and cannot do. On the other hand, with FTL devices you do not have much visibility to what is going on inside, vendors may lie about how good their FTL device is. If you find a bug in the firmware, vendors do not usually provide you a fast and easy way to update it, and so on.
  • Theoretically, UBIFS may do a better job because it knows much more information about the files than FTL. For example, UBIFS knows about deleted files, while FTL does not, so FTL may do unneeded work trying to preserve the sectors belonging to deleted files. However, some FTL devices support "discard" requests and may benefit from the file system hints about unused sectors. Nevertheless, in general, UBIFS should do a better job on a bare NAND than a traditional FS on an FTL device with a similar NAND chip. On the other hand, FTL devices may include multiple NAND chips, highly parallelize things and provide fast I/O. SSDs are probably good examples.
  • Obviously, the advantage of FTL devices is that you use old and trusted software on top of them. Be careful, though, as sometimes this may not be 100% true. UBIFS authors once tested a good brand eMMC with respect to the power cut tolerance. Some severe problems were found. Also, it was found that ext3 was not really usable with that eMMC either. What happened was that power cuts sometimes left some eMMC sectors not readable - the read operation returned ECC errors. But for ext3 read errors are fatal - it is not designed to handle them. The fsck.ext3 tool also refused to repair a file system which had unreadable sectors.

So it is indeed difficult to give an answer. Just think about cons and pros, take into account your system requirements and decide. Nonetheless, raw flashes are used, mostly in the embedded world, and this is why UBIFS has been developed.

flash分区 kernel_Openwrt文件系统及flash分区介绍 flash介绍从与CPU连接方法上flash分为两种如果闪存芯片是直接连接到CPU(SoC),并且能够直接被操作系统/Linux读取, 我们就把他叫做”raw flash”.如果闪存芯片不能够直接被操作系统/Linux读取 (由于闪存和SoC之间还需要另外的控制芯片来连接), 我们叫他 “FTL (FlashTranslation Layer) flash”. 嵌入式系统几乎全部使用”raw fl... 阅读详情

相关推荐

Cheap_Flash--嵌入式NandFlash驱动文件系统源代码下载

Cheap_Flash--嵌入式NandFlash驱动文件系统源代码下载 Cheap_Flash 代码由我们开发完成,经过了严格的测试。 坏块处理包括基于坏块表的处理程序,提供单/多扇区操作。 多扇区为nandflash处理设计,降低NANDFLASH物理块擦除数,具有扇区预处理分配功能,提高写入速度。 NANDFLASH驱动上面可以运行CheapFAT文件系统。 文件系统可以支持坏块替换,块擦除,块移动,页写入产生坏块。文件系统以NAND_FLASH坏块管理驱动运行。 NAND_FLASH支持ECC数据纠错,每个扇区二次ECC纠错,保证数据正确读出。 NAND_FLASH管理层如果发现不可纠错恢复的扇区,将把扇区读出为0,这样也就等于目录尾,文件系统读写停止,不会继续读出错。 本代码是32位的坏块处理文件系统,包括小页(528字节),中页和大页,中大页,可用于用户代码测试! 代码可以用于U盘,SD卡的设计。以及一些需要大容量存储设备项目上。 作者联系:qq:292942278 e-mail:292942278@qq.com

raw flash , emmc flash

raw flash: 通常nor/ nand flash存储芯片,如果是nand flash, 那么所有的ECC除错机制(Error Correcting Code)、区块管理(Block Management)、平均抹写储存区块技术(Wear Leveling)、Command Management、驱动程序等,都交给Host Processor处理,这些全部由软件来进行处理.由存储特性不一样,...

u012385733的专栏 1569

Cheap_Flash_FS--嵌入式NandFlash文件系统源码(使用极速版代码)下载

Cheap_Flash_FS--嵌入式NandFlash文件系统源码(使用极速版代码)下载 Cheap_Flash_FS 代码已经由我们开发完成,并经过了严格的测试。 坏块管理功能包括基于坏块表的管理程序,可以提供单/多扇区的操作。 多扇区为nandflash专门设计,可以降低NANDFLASH物理擦除数,具有FLASH上直接预分配功能。 其上面可以运行(Cheap_Flash_FS(支持多扇区操作))文件系统。 文件系统可支持实时坏块替换,包括擦除块,块移动,写入页产生坏块。文件系统基于NAND_FLASH坏块管理层驱动运行。 NAND_FLASH坏块管理支持ECC纠错,对每个扇区执行二次ECC纠错,保证数据正确的读出。 NAND_FLASH坏块管理层如果发现Unrecoverable_error扇区,可把扇区读出置为0,等于目录已结束,避免了文件系统运行出错。 本代码是32BIT的坏块表文件系统,可支持大于4G的nandflash,包括小页,中页,大页,用于用户代码测试! 可以用于U盘和SD卡(BLOCK_ERASE代码不免费提供,需收费提供)的设计上。以及其它大容量存储项目上。 qq:292942278 e-mail:tony_yang123@sina.com

raw flash vs FTL

1. 区别 raw flash devices: NAND, NOR, OneNAND, etc,其被作为MTD设备处理(既不是字符设备,也不是块设备)。 FTL device:Flash Translation layer device, MMC, eMMC, SD,不仅包含flash,还包含控制器,其被作为块设备处理。 FTL stands for "Flash Translation ...

weixin_34062329的博客 282

一种基于FAT文件系统的NAND_Flash坏块处理方法.doc

一种基于FAT文件系统的NAND_Flash坏块处理方法,快速掌握FAT的坏块处理

zephyr是面向物联网的嵌入式操作系统,这是有关这个系统的手册,包括建立开发环境、组成及每个部分的功能,API

zephyr是面向物联网的嵌入式操作系统 完全手册 API及例子 各组成部分描述

UBIFS介绍 raw flash和MMC flash的区别

origin: http://sh.516878.com/2013/1101/25699.html 在了解UBIFS之前一定要注意UBIFS和任何传统的文件系统是不一样的:UBIFS不是运行在block device之上的(比如hard disk, MMC/SD卡,USB flash驱动等等)。UBIFS是运行于raw flash之上。请在开始UBIFS之旅前确保理解raw flash和

yazhouren的专栏 3665

FAT快速版_usb_fat32_fat_

Cheap_flash_fs(高端版)--嵌入式FAT16/32文件系统源码免费下载本代码兼容FAT16/FAT32文件系统两种格式,兼容微软长文件名,支持中文文件名(带有GB2312/UNICODE转换码表,170KB)支持多级子目录,支持文件读取,写入,删除,创建等等文件系统的常用功能。总之,本文件系统源代码全部使用C代码编写,VC仿真测试,通过各种单片机的编译器,移植去各种单片机平台上实现文件系统模块。本代码的一次写可以达到1000个扇区以及更多,欢迎选用。(本代码是由我们提供的源代码,用户可根据需要测试,研究,和应用本代码。可用于商业产品上。

UBI系统详解

详细介绍了ubi的组织结构,如何解决nand flash的坏块,磨损均衡,位反转,掉电保护等问题;

qq_38232169的博客 5567

Flask测试平台开发[可运行源码]

本文详细介绍了基于Flask框架的测试平台开发过程,包括项目初始化、前后端服务创建、模块化开发及功能实现。内容涵盖项目蓝图设计、Flask后端服务搭建、Vue前端页面开发、接口配置及数据展示等核心环节。重点讲解了使用Blueprint进行模块化开发、前后端数据交互实现、Vue组件化开发等关键技术点,并提供了完整的代码示例。最后展示了产品管理页面的实现效果,为后续数据库关联开发奠定了基础。

第三篇:学习InternVL2.0(探讨代码之训练模块版)

InternVL2的训练模块

qq_69051120的博客 1244

关于 Flash 存储,你应该知道的一些事情

Flash 存储问题总是在我们技术支持渠道位列榜首。Toradex 投入了大量资源保证存储尽可能的稳定。然而,了解一些关于存储的基本知识还是十分重要的。首先你需要知道存储是否磨损,当往内置的存储设备上写入大量数据后,你就很容易损坏它。通过这篇博文,我们想要告诉你 Flash 存储可能会遇到的一些问题。我们先简单介绍技术内容。 Flash 类型:Raw Flash vs Manag

toradexsh的博客 7654

FPGA赋能:从加权灰度均值到快速收敛的自动曝光实战

本文深入探讨了FPGA在工业视觉自动曝光算法中的应用,重点介绍了加权灰度均值法的优化实现与快速收敛策略。通过硬件友好的算法改造和流水线架构设计,FPGA方案能在1帧内完成曝光调整,显著提升处理速度和能效比,适用于复杂光照条件下的工业检测场景。

weixin_29306317的博客 82

raw nand flash 与emmc nand flash的区别

1.通常情况下,我们所说的nand flash特指raw nand flash. flash本身没有坏块管理,需要软件进行坏换管理,也叫作 非管理的nand( non-managed NAND). emmc nand flash 芯片内部集成了坏块管理,软件不需要关注,也叫作可管理的nand(managed NAND) 2 raw nand 统一性做的不够好,各个厂家都有自己的特性,给使用者带来

leochen_career的专栏 4931

RustDesk网页端远程控制实战:如何用Web Client替代传统客户端(附安全配置建议)

本文详细介绍了RustDesk网页端远程控制的实战应用,包括其核心优势、配置流程及安全加固方案。通过Web Client替代传统客户端,用户可实现跨平台无缝体验和企业级管理效率,特别适合临时协作和移动设备使用。文章还提供了JWT身份验证、LDAP集成等安全配置建议,确保网页端访问的安全性。

weixin_30836759的博客 252

工业预测模型避坑指南:PHM2012轴承数据实战中,LSTM、CNN、Transformer到底怎么选?

本文深入探讨了工业预测模型在PHM2012轴承数据下的选型策略,对比了LSTM、CNN和Transformer等主流模型在轴承寿命预测任务中的表现。通过真实实验数据,提供了可复现的选型决策框架,帮助工程师根据数据规模、硬件条件和精度要求选择最佳模型。文章还揭示了工程落地中的隐藏陷阱,如数据不均衡和工况迁移挑战,并提出了解决方案。

weixin_33694172的博客 493

NAND flash -三种

转载地址:http://blog.csdn.net/edmond999/article/details/17450553 NAND Flash解决方案架构主流分为:raw NAND、ClearNAND和eMMC三种,各有不同的架构、界面和终端应用。生产厂商将会视不同客户和不同产品应用的需求,而灵活运用raw NAND、ClearNAND和eMMC 这3种NAND Flash解决方案。 raw ...

kunkliu的博客 3376

鱼鹰优化算法(OOA)详解:从猛禽捕食智能到优化算法实现

鱼鹰优化算法(Osprey Optimization Algorithm, OOA)是2023年提出的一种新型元启发式优化算法,灵感来源于鱼鹰(一种中型猛禽)高效的捕食策略。算法模拟了鱼鹰从空中识别水下鱼类位置并俯冲捕食,然后将捕获的鱼带至安全位置享用的全过程,以此抽象出全局探索和局部开发两个核心阶段。OOA算法具有参数少、结构简单、收敛速度快、全局寻优能力强等特点。自提出以来,已在函数优化、机器学习参数调优(如CatBoost模型)、路径规划等多个领域展现出良好性能,为解决复杂优化问题提供了新的有效工具。

qq_42212808的博客 273

Raw flash vs. FTL devices

FTL stands for "Flash Translation Layer" and it is software which emulates a block device on top of flash hardware. At early days FTL ran on the host computer. For example, old PCMCIA flash devices we

沉淀 1168

RTCA DO-160G标准详解:航空电子设备的全面环境适应性测试指南

第二章的主要目的是提供标准中使用的术语和定义。了解这些术语对于准确理解标准的要求至关重要,特别是在技术实施过程中。RTCA DO-160G 涉及多个学科的知识,包括航空、电子、电磁学和机械工程,因此需要确保使用的术语在所有学科中具有一致的定义。为了确保测试人员和工程师在执行测试时对所有条件和要求的理解一致,RTCA DO-160G 标准中定义了大量术语。环境应力:指的是设备在操作过程中可能遇到的外部物理或化学条件,包括温度、湿度、振动等。电磁干扰(EMI)

qq_41854911的博客 5276

Agentic-Desktop-Pet:构建本地智能桌面助手的架构与实践

智能体(Agent)作为人工智能领域的重要概念,是指能够感知环境、自主决策并执行任务以实现目标的软件实体。其核心原理在于结合感知、决策与执行模块,通过大语言模型(LLM)等推理引擎处理信息并驱动行动。这种架构的技术价值在于将AI的认知能力与具体的操作系统环境深度融合,从而创造出能主动理解用户上下文、提供个性化服务的智能伙伴。在应用场景上,智能体技术正从云端对话机器人向本地化、场景化的桌面助手演进,旨在解决传统自动化工具缺乏智能、而纯聊天机器人脱离操作环境的问题。本文探讨的Agentic-Desktop-Pe

weixin_27210125的博客 623

rawNAND、ClearNAND、eMMC的区别

NAND Flash解决方案架构主流分为:raw NAND、ClearNAND和eMMC三种,各有不同的架构、界面和终端应用。生产厂商将会视不同客户和不同产品应用的需求,而灵活运用raw NAND、ClearNAND和eMMC 这3种NAND Flash解决方案。 raw NAND raw NAND即是一般的NAND Flash内存芯片,所有的ECC除错机制(Error Correctin

欢迎光临 3685

Zemax与Matlab交互:双胶合优化详细流程

Zemax与Matlab交互:双胶合优化详细流程

weixin_72050316的博客 629
上一篇: mtd information
下一篇: Query Planning
wdsfup
博客等级 码龄20年 31粉丝 13原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值