完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
晚上好,我花了一些时间研究了将持久数据写入内部闪存的三个选项:(1)FATFS(ELM Chan.org/FSW/FF/00索引x.html),(2)和声的胖库,或者(3)在第52节闪存中提供的NVM函数的扩展……(3)被排除在关注的范围内。D需要更多的调试时间,而不是选择“现成的”。(2)由于开销、复杂性而被淘汰。在这些论坛上表达了一系列关于和谐的原因。这将是和声的第一次使用,所以需要熟悉一段时间来熟悉代码和文档。(1)因此,剩下FATFS,这是现在选择的方向。我不确定它是否是最好的选择。我正在寻找任何人谁已经实施FATF与内部程序Flash的见解。(a)我找不到任何样本源使用内部闪存结合FatFS。它看起来像LPC23 XX示例项目可以使用内部闪存作为一个例子。有人知道我是否可以利用一些样本资源?我发现了几个SPI串行闪存例子,但没有内部闪存。(b)我担心磨损均衡。PIC32 MZ的内部闪存由16K页与82K行组成。FATFS运行512字节扇区。扇区大小可以增加,但是小文件包含大量未使用的内存。这种“错配”看起来不太理想,可能会很快地将闪光灯擦掉——即10000擦除/写入周期。有人能解释当文件被写入时会发生什么吗?当文件系统的表被更新时,执行多少擦除/写入操作?假设分配表驻留在扇区2或页内。我在软件中看不到任何磨损均衡优化,所以我假设写数据对应用程序性能同样有害,并且对Flash的完整性征税。每个扇区写入需要一个页面擦除/写入。正确的?但是,文件系统没有优化,以解决16K页(擦除)与512字节写差异。谢谢,汤姆
以上来自于百度翻译 以下为原文 Good evening, I spent some time researching three options for writing persistent data to internal flash: (1) FatFS (elm-chan.org/fsw/ff/00index_e.html), (2) HARMony's FAT libraries, or (3) expansion of NVM functions provided in Section 52 Flash Memory.... (3) was eliminated over concerns that it would require more debugging time than choosing something "off-the-shelf". (2) was eliminated because of overhead, complexity, .... a slew of reasons expressed in these forums regarding Harmony. This would be the first use of Harmony so there is a ramp-up time required to familiarize myself with the code and documentation. (1) so, that leaves FatFS, which is the direction chosen for right now. I am not sure if it is the best option. I am looking for insights from anybody who has implemented FatFS to work with internal program flash. (A) I could not find any sample source that uses internal flash in conjunction with FatFS. It looks like the lpc23xx sample project may use internal flash as an example. Anybody know if there is some sample source I can leverage? I found a couple SPI serial flash examples, but nothing for internal flash. (B) I am concerned about wear leveling. The PIC32MZ 's internal flash consists of 16k pages with 8-2k rows. FatFS operates off 512 byte sectors. Sector size can be increased, but then small files contain a lot of unused memory This "mismatch" seems less than optimal and could wear out the flash in a hurry - i.e. 10,000 erase/write cycles. Can anybody explain what really happens when a file is written? How many erase/write operations are performed when the file system's tables are updated? Suppose an allocation table resides in sector 2 or within a page. I don't see any wear leveling optimizations in the software, so I assume writing data is equally detrimental to application performance, and taxing on the flash's integrity. Each sector written requires a page erase/write. Right? But, the file system isn't optimized to address the 16k page (erase) versus 512 byte write discrepancies. Thanks, Tom |
|
相关推荐
1个回答
|
|
我不知道有多少页面擦除/重写发生,但我有一些其他的见解。1。正如Mysil所言,FATFs可能不是内部闪存的好选择。它更适合USB棒、SD卡等。2。Mysil提到DEE仿真应用说明1095。该代码处理磨损均衡和最小化页面擦除。它不写文件,但是如果你只需要存储像用户偏好/设备设置之类的东西,那么这可能是一个很好的起点。3。我们试用FATFS开发了一种利用USB拇指驱动器的潜在产品。我们发现,当获得目录列表、读取文件等时,在某些情况下,磁盘访问代码被阻塞50毫秒以上。这是USB MSD设备类代码和FATFS代码的组合。我们喜欢使用轮询超循环,因为它是一个比RTOS更简单的编程模型,但它的权衡是,我们不能在软件中有任何阻塞操作。说到FatFS,访问磁盘等,我真的认为你需要去RTOS并有一个单独的磁盘访问线程——除非你的应用程序不受长时间运行/阻塞操作的影响。希望这有帮助。
以上来自于百度翻译 以下为原文 I don't know how many page erases / rewrites occur, but I have some other insights. 1. As Mysil stated, FatFS probably isn't a good choice for internal flash. It's better suited to USB sticks, SD cards, and the like. 2. Mysil mentioned the DEE emulation application note 1095. That code handles wear leveling and minimizing page erases. It doesn't write files, but if you just need to store things like user preferences / device setup, then this might be a good starting point. 3. We experimented with FatFS for a potential product utilizing USB thumb drives. We found that when getting a directory listing, reading files, etc., in some cases the disk-accessing code blocked for upwards of 50 milliseconds. This was a combination of the USB MSD device class code and the FatFS code. We prefer to use polled superloop because it's a much simpler programming model than RTOS, but it comes with the tradeoff that we cannot have any blocking operations in the software. When it comes to FatFS, accessing disks, etc., I really think you need to go to RTOS and have a separate thread for disk accesses -- unless your application is not affected by long-running / blocking operations. Hope this helps |
|
|
|
只有小组成员才能发言,加入小组>>
5170 浏览 9 评论
2001 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3176 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
736浏览 1评论
619浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
507浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
633浏览 0评论
530浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 13:00 , Processed in 1.288721 second(s), Total 78, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号