完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好。
我使用CYBLY-012011-00,当电源接通时,我可以执行软件复位吗? 我编写了控制NAND闪存(LSM330TR)的程序,但在打开电源后,没有执行软件重置,CySualARESETE(),就不能执行块擦除命令。 NAND处于未受保护模式。 有谁能帮我解决这个问题吗? 以上来自于百度翻译 以下为原文 Hello everyone. I'm using CYBLE-012011-00, can I execute software reset when the power is turned on? I wrote program that control NAND flash memory(LSM330TR) but I couldn't execute block erase command without execute software reset, CySoftwareReset() after the power is turned on. The NAND is in un protected mode. Can anyone help me solve this problem? |
|
相关推荐
3个回答
|
|
我唯一能找到的芯片你列如:iNEMO惯性模块:三维加速度传感器和3D陀螺仪从STM。
我的猜测是,cysoftwarereset()导致引脚/硬件切换/改变从而完成擦除周期从NAND。对于NAND闪存芯片应该有一个数据表描述如何完成擦除序列:功率循环的可能吗? 以上来自于百度翻译 以下为原文 I can only find the chip you listed as: iNEMO inertial module: 3D accelerometer and 3D gyroscope from STM. My guess is that the CySoftwareReset() is causing some pins/hardware to toggle/change which in turn finishes the erase cycle from your NAND. The flash chip for the NAND should have a datasheet describing how to finish the erase sequence: power cycle probably? |
|
|
|
yuhe82 发表于 2018-10-11 10:20 谢谢你的回复,E.普拉特。 对不起,我弄错了。我使用的是W25M02GV,而不是LSM330TR。 http://www. WebLog.com /资源文件/W25M02GV%20RevB%200 70115PDF 我检查了删除顺序和电气特性。 该块擦除程序在SPI连接上发送擦除命令,当擦除未完成时,它继续读取擦除失败位。 我不知道为什么这个擦除程序只有在软件重置后才能完全运行。 在NAND电源打开后,我插入了足够的延迟。 如果英语中有一些错误,我想道歉。 空隙W25M02GY128KB阻塞酶(UTIN 16 PADADADR) { W25M02GXWrreEnEnable();/ /禁用写保护 CyDelay(1); SPIMESPIUARTECURLXXBUFER();//清除RX缓冲区 SPIMESPIUARTECARTTXBUFER();//TURX TX缓冲区 UTI8Page=Page ADDR & gt;8页;//页地址 UTI8Page =(Page ADDR和0x00 FF);/ /页地址 CyDelay(1); MimyCsScript写入(0);//NAND SPI芯片选择信号低 CyDelay(1); SPMISPIPUARTWRITETXDATA(W25M02GY128KBX块擦除)和/块擦除命令 SPIMESPILARTWRITETXDATA(0x00);/虚拟时钟 SPMISPIXARTWRITETXDATA(/PAGE);/页地址 SPIMASPIOWARTWRITETXDATA(PAGEL);/页地址 同时(SPIML SPIUARTEGETRXBuffRsisie())= 4){}/ /等待发送完成 MimyCsScript写入(1);//NAND SPI芯片选择信号高 (1) { UITN8 STS3= 0x00; STS3= W25M02GYRealStaseRealScript(0xC0);/ /用于擦除失败位的读状态寄存器3 如果((STS3&AMP;0x01)==(0和lt;& lt;0)) { ErryLeDyx写(1); CyDelay(20); 如果((STS3&AMP;0x04)==(1和lt;lt;2))/ /如果删除失败位为1 { //到无限循环等待擦除完成 /如果不执行软件重置,请继续留在这里!! } 否则,如果删除完成 { 返回; } } } } 以上来自于百度翻译 以下为原文 Thank you for your reply, e.pratt. Sorry I made a mistake. I'm using W25M02GV, not LSM330TR. https://www.winbond.com/resource-files/w25m02gv%20revb%20070115.pdf I checked the delete sequence and the electrical characteristics. This block erase program sends erase command on SPI connection, and it continue to read the erase failure bit while erase isn't complete. I don't know why this erase program runs completely only after a software reset. I inserted enough delay after NAND power is turned on. If there are some mistakes in English, I'd like to apologize. void W25M02G_128kbBlockErase(uint16 pageAddr) { W25M02G_WriteEnable(); //disable write protect CyDelay(1); SPIM_SpiUartClearRxBuffer(); //clear RX buffer SPIM_SpiUartClearTxBuffer(); //clear TX buffer uint8 pageH = pageAddr >> 8; //page address uint8 pageL = (pageAddr & 0x00ff); //page address CyDelay(1); MEM_CS_Write(0); //NAND SPI Chip Select Signal Low CyDelay(1); SPIM_SpiUartWriteTxData(W25M02G_128KB_BLOCK_ERASE); //block erase command SPIM_SpiUartWriteTxData(0x00); //dummy clock SPIM_SpiUartWriteTxData(pageH); //page address SPIM_SpiUartWriteTxData(pageL); //page address while(SPIM_SpiUartGetRxBufferSize() != 4){} //wait for send complete MEM_CS_Write(1); //NAND SPI Chip Select Signal High while(1) { uint8 sts3 = 0x00; sts3 = W25M02G_ReadStatusRegister(0xC0); //read status register3 for erase failure bit if((sts3&0x01)==(0 << 0)) { ERR_LED_Write(1); CyDelay(20); if((sts3&0x04)==(1 << 2)) //if delete failure bit is 1 { //go to infinity loop to wait erase complete //continue staying here if not execute software reset!! } else //else if delete is finished { return; } } } } |
|
|
|
dfgsdf 发表于 2018-10-11 10:32 我的猜测是,它正确地用于擦除和检查RX字节计数达到4或W25M02GYRealStaseRealSt登记(0xC0)的方法;命令不工作,导致芯片处于无限等待中。然后重置将从无限循环中退出,回到“主擦除”,在“重置”芯片之前,“擦除”被“完成”。 CS的高触发触发擦除,复位CyPress芯片将导致CS引脚走高。因此,这就是我的调查方向。 SPIMESPIRTARGETRXBuffResiZe()具有或不具有RX软件缓冲区启用的稍微不同的行为。试着打开/关上? 如果启用SPI中断并将RX FIFO级别设置为4,然后使用中断,则可以验证SPI是否正确发送所有字节。然而,最有可能的是SPI RX缓冲器正确返回4,但对双重检查并不有害。 尝试更换: 如果((STS3&AMP;0x04)==(1和lt;& lt;2)) 用: 如果(!)(STS3&0x02) 以确保位在状态寄存器中排队。 此外,它可以是函数中的代码:W25M02GYRealStasuScript(0xC0); 无法正常工作并返回无效数据。 以上来自于百度翻译 以下为原文 My guess is that it is working properly for the erase and your method of checking the RX byte count getting to 4 or the W25M02G_ReadStatusRegister(0xC0); command are not working, causing the chip to sit in an infinite wait. A reset will then exit out of the infinite loop and go back to main with the "erase" being "completed" before you even reset the chip. THE CS going high triggers the erase, and resetting the cypress chip will cause the CS pin to go high. Thus, that would be my direction of inquiry SPIM_SpiUartGetRxBufferSize() has slightly different behavior with or without the RX software buffer enable. Try turning that on/off? If you enable the SPI interrupts and set the RX FIFO level to 4, then use an interrupt, you can verify that the SPI is sending all of the bytes properly. Most likely the SPI RX buffer is properly returning 4 however, but it doesn't hurt to double check. Try replacing: if((sts3&0x04)==(1 << 2)) with: if(!(sts3 & 0x02)) to make sure the bits are lining up in the status register. Also, it could be your code in the function: W25M02G_ReadStatusRegister(0xC0); is not working correctly and returns invalid data. |
|
|
|
只有小组成员才能发言,加入小组>>
752个成员聚集在这个小组
加入小组2075 浏览 1 评论
1829 浏览 1 评论
3645 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1766 浏览 6 评论
1517 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
516浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
370浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
413浏览 2评论
360浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
868浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-29 08:19 , Processed in 1.021313 second(s), Total 51, Slave 44 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号