相同的读写程序片选时序不同[mw_shl_code=applescript,true]void FSMC_SRAM_WriteBuffer(uint16_t* pBuffer,uint32_t WriteAddr,uint32_t n)
{
// WriteAddr = WriteAddr <<1 ; //FSMC′æ′¢Æ÷êy¾Y¿í¶èéèÎa16bitê±£¬×üÏßμØÖ·×Ô¶ˉóòòÆ1λ£»òò′ËóëFPGAí¨DÅê±½«μØַλÏè×óòÆ1λ¡£
for(;n!=0;n--)
{
WriteAddr = WriteAddr <<1 ;
*(vu16*)(Bank1_SRAM2_ADDR+WriteAddr)=*pBuffer;
WriteAddr = WriteAddr >>1 ;
WriteAddr++;
(*pBuffer)++;
}
}
void FSMC_SRAM_ReadBuffer(uint16_t* pBuffer,uint32_t ReadAddr,uint32_t n)
{
// ReadAddr = ReadAddr <<1 ; //¶áóëD′Ïàí¬
for(;n!=0;n--)
{
ReadAddr = ReadAddr <<1 ;
*pBuffer++=*(vu16*)(Bank1_SRAM2_ADDR+ReadAddr);
ReadAddr = ReadAddr >>1 ;
ReadAddr++;
}
} [/mw_shl_code]
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>