完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我正在做一个项目,我需要使用SPI闪存。然而在和谐中只有SST25存储器芯片的驱动器。有人有经验修改这些驱动程序与其他芯片一起工作吗?我有S25FL128SAGMFI1.1芯片和PIC32 MZ2064 DAH176。和谐版本2.05i需要内存至少128兆位,所以SST25芯片是不合适的,如果我没有错的话(它们是64兆比特max?)Maby,你知道一些其他的内存芯片可以更好地使用SST25驱动程序,或者Maby你可以分享一些定制的SPI闪存驱动器。欢迎大家提出建议。
以上来自于百度翻译 以下为原文 Hi everyone, I'm working on a project and I need to use SPI flash memory. However in hARMony there are only drivers for SST25 memory chips. Does someone have experience modifying these drivers to work with other chips? I have S25FL128SAGMFI001 chip and PIC32MZ2064DAH176. Harmony version 2.05 I need memory to be at least 128 Mbit, so SST25 chips are not suitable, if I'm not mistaken (they are 64 Mbit max?). Maby you know some other memory chip that would be better/easier to use with SST25 drivers, or maby you have and can share some custom SPI flash drivers. What SPI flash memory chips have you used with harmony? All suggestions are welcome. |
|
相关推荐
12个回答
|
|
许多闪存芯片有一个非常类似的命令集,只要你可以使用SPI模式而不是SQI模式(芯片通常在如何切换到SQI模式上不同),那么将当前驱动程序中的一个移植到你的新设备上不应该是太大的问题。驱动程序检查设备上的JEDEC ID,以确保他们正在与正确的设备交谈,所以您需要更改以匹配您的CyPress部分。
以上来自于百度翻译 以下为原文 Many of those flash chips have a very similar command set as long as you're okay with using SPI mode and not SQI mode (the chips usually differ in how to switch to SQI mode), so porting one of the current drivers to your new device should not be too much of an issue. The drivers do check for the JEDEC ID on the device to make sure they are talking to the correct device, so you'll need to change that to match your Cypress part. |
|
|
|
SPI模式是完美的。你做过类似的移植吗?快速查看后,我想我需要改变ID,增加正确的内存大小,扇区大小,改变一些操作码,以及如何发送一些命令。我是否缺少一些需要改变的东西?
以上来自于百度翻译 以下为原文 SPI mode is perfect. Have you done similar porting? After a quick look I think I will need to change ID, add correct size of memory, sector size, change some opcodes and how some of the commands are sent. Am I missing some something things that needs to be changed? |
|
|
|
HI,在和谐2.06(也可能是2.05)中有一些示例性项目用于SQI Flash:C:Microchip 和谐 V2Y06App\示例外围 SQ\C: Microchip 和声 V2Y06AppFSsQIYFAT
以上来自于百度翻译 以下为原文 Hi, In Harmony 2.06 (maybe also 2.05) there are some example projects for SQI Flash : c:microchipharmonyv2_06appsexamplesperipheralsqi c:microchipharmonyv2_06appsfssqi_fat Regards |
|
|
|
|
|
|
|
和声驱动是可选的。您可以直接使用PICS SPI接口与Flash芯片交谈。
以上来自于百度翻译 以下为原文 Harmony Drivers are optional. You can talk to the Flash chip directly using the PICs SPI Interface. |
|
|
|
我已经编写了自己的驱动程序(我拒绝使用和声),所以我知道一些关于这些芯片和不同之处。除了Microchip 25系列部分之外,我知道的所有25个系列SPI闪存部件都具有相同的“核心”功能。最重要的命令是读块(08H)和写块(02H)命令。通过这些命令,您可以发送一个起始地址和若干字节进行读取或写入,并且该部分自动递增地址。命令的限制是起始地址和结束地址必须位于同一个256字节的页面上。这意味着您需要编写驱动程序,以便它在不跨越这个256字节页面边界的块中写入。“25系列”微芯片部分不支持这些命令。他们有自己的命令(具有不同的十六进制值),最多写256字节,对地址的页面边界没有限制。奇怪的是,“26系列”的微芯片部分遵循25系列核心命令,但与其他制造商的部分不同,它们被锁定在电源上,因此CK命令必须在他们可以被写入之前发送。如果您仔细编写驱动程序,您可以避免每个制造商25个系列部件的独特特性,并有一个设计将容纳一个广泛的制造商,如Adesto,SunStand,WiBand等。
以上来自于百度翻译 以下为原文 I have written my own drivers (I refuse to use Harmony) so I know a little bit about these chips and the difference. All 25 series SPI flash parts i know of, except for the Microchip 25 series part, have the same "core" functions. The most important commands are the Read block (08h) and write block (02h) commands. With these command you can send a start address and a number of bytes to be read or written, and the part automatically increments the address. The limitation of the command is the start and end address must lie withing the same 256 byte page. This means you need to write the driver so it writes in blocks that do not cross this 256 byte page boundary. The "25 series" Microchip part does not support these commands. They have their own commands (with different hex values ) that write up to 256 bytes with no restriction on the page boundaries for the address. Weirdly the "26 series" Microchip parts do follow the 25 series core commands, but unlike other manufacturer's parts they are locked on power up, so an unlock command must be sent before they can be written. If you are careful writing the driver you can avoid the unique features of each manufacturers 25 series parts and have a design that will accomodate a wide range of Manufacturers such a Adesto, Spansion, Winbond, etc. |
|
|
|
“25系列”微芯片部分是SST的一部分,他们得到了他们购买SST。
以上来自于百度翻译 以下为原文 The "25 series" Microchip part is an SST Part that they got with they bought SST. |
|
|
|
使用两个64兆比特的芯片并不是真正的选择,因为部分内存将被作为USB MSD访问,以便在需要时存储MCU来读取文件。现在,我使用SST25.FAT示例来了解SST25驱动程序的工作原理和需要更改的内容。当试图创建一个预期的文件时,示例失败,因为我还没有编写正确的写入(和可能读取)命令。起初我没有注意到这一点。
以上来自于百度翻译 以下为原文 Using two 64 Mbit chips is not really an option, because this memory in part will be accessed as USB MSD to store files for MCU to read them when there is a need. Right now I'm using sst25_fat example to get an idea how sst25 driver works and what needs to be changed. By adding correct chip ID, code example fails when trying to create a file which is expected, because I didn't yet wrote correct write (and probably read) command. malaugh thanks for the heads up about address wrapping around in the same page. I didn't notice that at first. |
|
|
|
SST25 64兆位的芯片,当你尝试写外页边界。因此,似乎Sty25的驱动程序应该处理这个东西。我删除了写状态寄存器命令,因为我的芯片没有这个功能。改变了几何形状来匹配我的芯片。所有其他命令看起来都是兼容的,甚至是相同的。在进行这些更改之后,没有明显的变化,程序不起作用。我注意到,在格式化MCU程序期间,大量连续的0xFF。这看起来也不对。与SST25VF064 C相比,扇区大小有一个很大的不同。SST具有均匀的4 kb扇区,而S25FL具有混合扇区大小(少4 kb,大部分为64 kb)。Maby我在Flash配置位中丢失了一些东西。但我迷路了。有什么想法吗?
以上来自于百度翻译 以下为原文 SST25 64 Mbit chip does wrap around, when you try to write outside page boundry. So it seems that harmony SST25 driver should handle this stuff. I removed Enable-Write-Status-Register command as my chip do not have this function. changed geometry to match my chip. All other commands look compatible or even identical. After making these changes there are no noticeable changes, program doesnt work. I noticed that during formatting mcu programs whole lot of consecutive 0xff. That doesnt look right too. There is one big difference compared with SST25VF064C. Sector size. SST has uniform 4 KB sectors, while S25FL has hybrid sector sizes (few 4 KB and mostly 64 KB). I'm not sure what could be wrong. Maby I'm missing something in flash configuration bits. But I'm pretty lost. Any ideas? |
|
|
|
我会检查他们写数据的驱动程序代码。在微芯片部分,命令02是一个单字节写入,与一般25系列部件中的多字节写入。Microchip使用命令ADH进行多字节写入,但它们将最小值限制为2字节。
以上来自于百度翻译 以下为原文 I would check the driver code where they write data. In the Microchip part, command 02 is a single byte write, vs a multi byte write in the generic 25 series parts. Microchip uses command ADh for their multi byte writes, but they restrict the minimum to 2 bytes. |
|
|
|
查看DRVYSST25.C文件,我可以看到,对于所有的芯片驱动程序都使用AAI写操作码(ADH或AFH),ExpTSt2525F064 C。对于该芯片,它使用02H操作码。在那个芯片数据表中,它可以写多达256个字节。这个命令在我的芯片中(在我的ExtCube芯片中有256个字节),所以命令看起来是相同的。在驱动程序代码中,如果使用02h命令,它允许一次写入整个页面,如果ADH-则限制每个命令写入2个字节。我相信DR。IVER只写一个或另一个操作码。当我编辑驱动程序时,我确信它使用的是02H操作码。当我得到更多的时间时,我会尝试手动写/读数据,看看芯片是否表现得像预期的一样,没有机械问题。我还会仔细检查我所做的几何图表。
以上来自于百度翻译 以下为原文 Looking into drv_sst25.c file i can see that for all chips driver uses AAI write opcode (ADh or AFh), exept SST25VF064C. For that chip it does use 02h opcode. In that chips datasheet it says that it can write up to 256 bytes. That command in my chip (256 bytes in my extact chip) So commands look identical. In driver code if 02h command is used it allows to write whole page at a time, if ADh - then it do limits write to 2 bytes per command. if (deviceId == 0x4B) { /* SST25VF064C */ /* Write block size and number of blocks */ dObj->mediaGeometryTable[1].blockSize = DRV_SST25_PAGE_SIZE; dObj->mediaGeometryTable[1].numBlocks = flashSize >> 8; dObj->flashFunctions.write = DRV_SST25_WritePageProgram; } else { /* Write block size and number of blocks */ dObj->mediaGeometryTable[1].blockSize = 2; dObj->mediaGeometryTable[1].numBlocks = flashSize >> 1; dObj->flashFunctions.write = DRV_SST25_WriteAutoAddressIncrement; if (deviceId == 0x49) { /* SST25VF010A */ dObj->opCodes.write = DRV_SST25_CMD_AAI_PROGRAM1; } else { dObj->opCodes.write = DRV_SST25_CMD_AAI_PROGRAM; } } I believe that driver writes only with one or the other opcode. When I edited the driver I made sure that it's using 02h opcode. So it should be alright in that category. When I get more time I'll try to manually write/read data, see if chip behaves as expected, there are no mechanical issues. I'll also double check GeometryTable things I did change. |
|
|
|
你是正确的,当我开发驱动程序,微芯片部分WASST25VF032 B。看起来他们在StS25VF064 B上增加了多字节写入功能。然而,他们现在已经淘汰了部分,有利于他们的26系列部分。如果写是OK,那么问题可能在于它们的写保护特性。
以上来自于百度翻译 以下为原文 You are correct, when I developed the driver, the Microchip part was SST25VF032B. It looks like they added the multi byte write feature on the the SST25VF064B. however they have obsoleted that part now, in favor of their 26 series part. If the write is OK, its likely that the problem is in their write protection features. |
|
|
|
只有小组成员才能发言,加入小组>>
5208 浏览 9 评论
2017 浏览 8 评论
1943 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3189 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2244 浏览 5 评论
758浏览 1评论
646浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
564浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
657浏览 0评论
556浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-10 00:10 , Processed in 1.610924 second(s), Total 71, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号