This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GPMC读数据为0 的问题

Other Parts Discussed in Thread: AM3352, SYSCONFIG

裸机程序  ,

starterWare源码  

evmAM335x   

开发工具:IAR 7.0

芯片:am3352

8位    同步读写    看波型也是对的,FPGA数据也出来了, 读FPGA  ,每次读出来数据据是 0,不知道为什么,请指教

问题

1:为什么一直读出来是0

Memory browser中看到这个地址中确实是0,为什么手动不给修的改

原码如下

int main(void) 

{
int databuffer =0;

GPMCClkConfig();
EDMAModuleClkConfig();
NANDPinMuxSetup();//对AD gpmc_CLk做过配制

GPMCModuleSoftReset(0x50000000);
while(GPMCModuleResetStatusGet(0x50000000) != 0x01);//等待复位完成

HWREG(0x50000000 + 0x10) = 0x00000008;//SYSCONFIG
HWREG(0x50000000 + 0x1C) = 0x00000000;
HWREG(0x50000000 + 0x40) = 0x00001FF0;
HWREG(0x50000000 + 0x44) = 0x00000000;
HWREG(0x50000000 + 0x48) = 0x00000000;
HWREG(0x50000000 + 0x50) = 0x00000a12;//GPMC_CONFIG

HWREG(0x50000000 + 0xC0) = 0x28000001;//congif1 
HWREG(0x50000000 + 0xC4) = 0x00101004;//congif2 
HWREG(0x50000000 + 0xC8) = 0x22080814;//congif3 
HWREG(0x50000000 + 0xCC) = 0x10081018;//congif4 
HWREG(0x50000000 + 0xD0) = 0x010E1414;//congif5 
HWREG(0x50000000 + 0xD4) = 0x0f070000;//congif6 
HWREG(0x50000000 + 0xD8) = 0x00000F41;//congif7 
while(1)
{
databuffer=(*(volatile unsigned char*)(0x1000004));  //databuffer为0,为什么
}
HWREG(0x10000004)=databuffer;
}