完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
晚上好,现在的情况:我们很好地开发了一个使用PIC32 MZ单片机的系统。不久前,我实现了“第52节”中提供的NVM函数。闪存与支持现场更新“数据表”。这些功能用于支持MCU的程序存储器中的环形缓冲器。此外,我实现了使用单个16K页面来存储系统配置信息。这一切都很好。我有了一个新的需求,开发一个新的通用闪存驱动器,可用于各种各样的目的,包括存储新的图像,存储日志数据,存储新的消息,…似乎需要为持久存储提供低容量的写入能力。我已经设想了使用基于NVM的函数。然而,我没有磨损水平功能内置到我写的一套功能。而且,纠错非常简单(基本重试)。我收到了一个检查和谐的请求。由于长时间阅读各种论坛文章、文章等,我有很多问题。关于和声的一般问题:1)和谐的状态是什么?我看到一些古老的帖子,和声比送货更具希望。我读到,和谐是(A)复杂的,(B)臃肿,(C)缺乏支持/专业知识的支持,(d)缺乏“友好”,因为它是如此通用。同样,帖子是过时的,我想知道这些观点是如何相关的。使用内部闪存的和谐支持:1)和声是否也有NVM驱动程序?2)我读过关于MPFs的文章,但这似乎集中在网页的支持上。它提供了一个文件系统。这是否支持使用程序内存(内部闪存)与我需要的通用闪存驱动程序相结合?3)我读了很多关于FatFS的书。更新的帖子表明和谐支持FatFS。这是真的吗?我怀疑和声支持FATFS。4)有什么其他方面的和谐能为我的通用闪存驱动提供支持吗?5)可用文件系统需要多少开销?一些细节从我试图验证的老帖子…1)和谐文件系统演示文档讨论使用FAT12。AN1045谈到FAT16和FAT32。这些是什么?这些和FatFS相似吗?2)在另一篇文章中,我读到了和谐的FATFS支持SD卡的工作。它与外部NAND闪存一起工作吗?它是否使用内部程序存储器闪存,我相信它不是闪存?从我读的帖子中,FATFS基于512字节扇区大小,PIC32 MZ内存的16K页面大小不兼容。FIAFS的执行与内部Flash协同工作吗?年长的帖子建议“不”。3)和声的FATFS实现了磨损均衡和/或错误校正吗?我对这么多的问题表示歉意。我真的试着阅读使用和谐来支持FATFS或其他基于微芯片的文件系统。有些帖子是过时的,所以我不确定所提出的观点是否仍然有效。而且,坦率地说,我的NVM功能在3种能力中的2种中发挥了很好的作用。文件系统的使用有点奇怪。我的实现是基于内存的:NVMYALLATATE()返回一个指向内部闪存的指针,它可以用于业务逻辑调用的任何目的。NVMLRead()-实际上不需要,因为内存可以通过返回的指针直接读取。TES闪存。将Flash页面复制到RAMNVMWRead 8()中-写入一个字节/ChannvMyWrreEff16()编写一个16位ValueVMWReWreE32()写入一个32位ValueNVMyPrimeReWrE()-在Flash中擦除页面,复制存储在RAM中的更新页到Flash,验证写操作nvMistStutsUf()返回StATUNVMyCube()的清除/重置分配的空间。NVMYFILE()删除保留闪存的块并压缩可用的Flash。我设想了一个请求内存块,包括一个头(块大小,和下一个请求块的地址)和B。内部闪存的锁定,以业务逻辑的任何方式使用。本质上,我提供了一个可变大小的链表。我有一些想法提供一些错误纠正,但磨损水平仍然是一个问题,虽然使用情况表明,写的量应该相对较低。谢谢你,汤姆
以上来自于百度翻译 以下为原文 Good evening, Current situation: We are well into the development of a system that uses the PIC32MZ MCU. Not long ago, I implemented the the NVM functions provided in the "Section 52. Flash Memory with Support for Live Update" datasheet. The functions are used to support a ring buffer in the MCU's program memory. In addition, I implemented the use of a single 16k page to storage system configuration information. This all works very well. I've been given a new requirement to develop a new generic flash driver that can be used for a variety of purposes including storing new images, storing log data, storing new messages, .... It seems the requirement is to provide low volume write capabilities to persistent storage. I've envisioned using the NVM based functions. However, I have no wear leveling functionality build into the set of functions I've written. And, error correction is very rudimentary (basically retries). I received a request to check HARMony. As a result of lengthy reading of various forum posts, articles, etc, I have many questions. General Question about Harmony: 1) What is the state of Harmony? I saw some older posts that Harmony offered more promise than delivery. I read that Harmony is (a) complex, (b) bloated, (c) lacks support/expertise of support, (d) lacks 'friendliness' because it is so generic. Again, posts were rather dated and I wonder how relevant those opinions are today. Harmony support for use of internal flash: 1) Does Harmony have an NVM driver too? 2) I read about MPFS, but this seems to focus on the support of web pages. It provides a file system. Does this provide support for using program memory (internal flash) in conjunction with my needed general flash driver? 3) I read a lot about FatFS. Newer posts indicate Harmony supports FatFS. Is this true? I suspect Harmony supports FatFS. 4) Are there any other aspects of Harmony that would provide support for my generic flash driver? 5) How much overhead is required for the available file systems? Some specifics from older posts that I am trying to validate.... 1) Harmony File System demo documentation discusses use of Fat12. And, AN1045 speaks of Fat16 and Fat32. What are these? Are these similar to FatFS? 2) In another post, I read that Harmony's FatFS support works with SD cards. Does it work with external NAND flash? Does it work with internal program memory flash, which I believe is NOR flash? From the posting I read, FatFS is based on a 512 byte sector size and the 16k page size of PIC32MZ internal memory poses incompatibilities. Will Harmony's implementation of FatFS work with internal flash? Older posts suggest, "no". 3) Does Harmony's FatFS implement wear leveling and/or error correction? I apologize for the plethora of questions. I really tried to read up on the use of Harmony to support FatFS or some other Microchip based file system. Some posts are rather dated so I am not sure whether points made are still valid or not. And, quite frankly, my NVM functions work well for 2 of 3 capabilities. Use of a file system sees a bit odd. My implementation is more memory based: NVM_allocate() returns a pointer to a block of internal flash that can be used for whatever purpose called for by the business logic. NVM_read() - not really needed since memory can be read directly through the returned pointer. NVM_startWrite() - initiates updates to flash. Copies the page of flash into RAM NVM_write8() - writes a byte/char NVM_write16() - writes a 16 bit value NVM_write32() - writes a 32 bit value NVM_commitWrite() - erases the the page in flash, copies the updated page stored in RAM to flash, validates the write operation NVM_status() - returns the status of a corresponding NVM based parameter. NVM_clear() - clears/resets the allocated space. NVM_free() - removes the block of reserved flash memory and compresses available flash. I envisioned a block of requested memory to consist of a header (block size, and address to the next requested block) and block of internal flash reserved for use in whatever way the business logic requires. In essence, I provide a variable sized linked list. I have a few ideas on providing some error correction, but wear leveling is still an issue, although use-cases suggest the volume of writes should be relatively low. Thank you, Tom |
|
相关推荐
3个回答
|
|
仍然同意许多关注。虽然和声和MHC在一年前领先,但正在进行的问题/文档/慢支持仍然令人沮丧。我正在使用带有USB拇指驱动器的文件系统。奖金是允许保留一个可移动的日志文件(矿山是一个文本文件用作黑匣子记录器),并更新文本配置文件在现场通过交换拇指驱动器,而不是必须重新编程PIC。拇指驱动器是正常格式化的Windows PC,正常的限制2GB/FILL。特别点:-PIC32 MZ美国为USB留出的竞价引脚即使未连接(搜索相关帖子)。-确保VBUS USB监视器引脚(PIC73PZMZZ144PIN)通过100R连接到USB插座Pin 5 VBUS。-确保VBUS插座Pin 5上的适当电压(& gt;=120 UFF*和*100NF)。堆。一些演示似乎只分配500字节堆,但我们中的许多人发现了10000或20万字节需要可靠的插入/弹出/插入的拇指驱动器/ USB棒。确保您使用最新的工具(OrthyV206+MHC,MPLABX,XC32)。尽量保持您的MODS在您自己的文件,有限的MODS到MHC生成的文件。其中MODS需要注释要替换的行(不要删除),如果合理的话,用替换代码在您自己的文件中调用子程序,然后创建一个文档,您必须做出所有更改,以防升级:一个打字或毛病会占用您的更改。
以上来自于百度翻译 以下为原文 Still agree with many of the concerns. Though harmony and MHC are leaps ahead of where they were a year ago, the ongoing issues/documentation/slowSupport are still very frustrating. I am using the filesystem with a USB Thumbdrive. Bonus is allows keeping a removable logfile(mine is a textfile used as a blackbox recorder), and updating text config file in the field by swapping thumbdrive instead of having to reprogram PIC. Thumbdrive is normal formatted on a windows PC, with normal limit of 2GB/file. Special Points: - PIC32MZ USBID pin reserved for USB even if not connected (search for related posts). - Ensure VBUS USB Monitor Pin (pin73 on PIC32MZ_144pin) is connected by 100R to USB socket pin5 VBUS. - Ensure sufficicent capacitance with appropriate voltages on VBUS socket pin5 (>=120uF *and* 100nF). - Ensure sufficient Heap. Some demos seem to assign only 500Byte heap, but many of us have found 10000 or 20000bytes required for reliable insert/eject/insert of Thumbdrive/USB Stick. Ensure you use latest tools (HarmonyV206+MHC, MPLABX, XC32). Try to keep your mods in your own files, limited mods to MHC generated files. Where mods necessary comment out the lines to be replaced (don't delete), and if reasonable call a subroutine in your own file with replacement code, and then create a document with all the changes you have to make in case: - you upgrade harmony - a typo or glitch eats your changes Paul |
|
|
|
我同意保罗,我补充说,你应该把你的文件保存在和声DIR树之外的一个DIR中。过去我发现有必要删除整个和声DIR。需要对生成的和声文件进行修改以调用用户函数。
以上来自于百度翻译 以下为原文 I agree with Paul, I would add that you should keep your files with the subroutines in a dir outside of the Harmony dir tree. In the past I have sometimes found it necessary to delete the entire Harmony dir. It might be nice if the Harmony files called weak null functions in app task etc. so as not to require modifications to the Harmony generated files to call user functions. |
|
|
|
谢谢你们的回复。我很感激你分享了你的想法。汤姆
以上来自于百度翻译 以下为原文 Thank you both for your replies. I appreciate that you shared your thoughts. Tom |
|
|
|
只有小组成员才能发言,加入小组>>
5178 浏览 9 评论
2003 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3177 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
738浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
636浏览 0评论
533浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-27 01:11 , Processed in 1.326218 second(s), Total 80, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号