外部SRAM有时数据有几个数据不对

2019-07-21 04:41发布

如果用循环读取,1KB的数据大概会有几个字节不对,有时候有时正确的 [mw_shl_code=c,true] for(Addr = 0x68000000;Addr < 0x68100000;Addr += 4) { InData = GUI_GetTime(); *(__IO uint32_t*)(Addr) = InData; OutData = *(__IO uint32_t*)(Addr); if(InData == OutData) RightCount++; else GUI_DispStringAt("Check Error!",5,105 + 2 * 16); Count++; }[/mw_shl_code]
FSMC 的配置代码 [mw_shl_code=c,true] FSMC_NORSRAMTimingInitStructure.FSMC_AddressSetupTime = 4; FSMC_NORSRAMTimingInitStructure.FSMC_AddressHoldTime = 0; FSMC_NORSRAMTimingInitStructure.FSMC_DataSetupTime = 4; FSMC_NORSRAMTimingInitStructure.FSMC_BusTurnAroundDuration = 0; FSMC_NORSRAMTimingInitStructure.FSMC_CLKDivision = 0; FSMC_NORSRAMTimingInitStructure.FSMC_DataLatency = 0; FSMC_NORSRAMTimingInitStructure.FSMC_AccessMode = FSMC_AccessMode_A; FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM3; FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_SRAM; FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &FSMC_NORSRAMTimingInitStructure; FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &FSMC_NORSRAMTimingInitStructure; FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure); [/mw_shl_code]
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
6条回答
改过时序也不行
styleno1
2楼-- · 2019-07-21 13:09
成熟的硬件平台吗?
回复【3楼】styleno1:
---------------------------------
正点原子
4楼-- · 2019-07-21 22:37
帮顶....
colin2135
5楼-- · 2019-07-22 03:53
 精彩回答 2  元偷偷看……
回复【6楼】colin2135:
---------------------------------
用FSMC驱动,我用的是IS62WV51216BLL 8Mbit的

一周热门 更多>