打印
[STM32F1]

STM32F103 +DM9000A 读取ID错误

[复制链接]
1569|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
L_686|  楼主 | 2014-9-29 09:39 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
100脚的stm32103接DMA9000AEP  NE1接DM9000AEP 片选信号,地址线A16接DM9000AEP CMD信号;其他信号如 D0~D15共用,用bank1 设置
REG_ADDR     (*((volatile uint16_t *) 0x60000000 ))       
REG_DATA      (*((volatile uint16_t *) 0x60020000 ))       
现在读取DM9000A ID错误,为0x90909047,


FSMC配置如下:
        FSMC_NORSRAMInitTypeDef  FSMC_NORSRAMInitStructure;
        FSMC_NORSRAMTimingInitTypeDef  FSMC_NORSRAMTimingInitStructure;

        FSMC_NORSRAMTimingInitStructure.FSMC_AddressSetupTime = 2;//0
        FSMC_NORSRAMTimingInitStructure.FSMC_AddressHoldTime = 2;//0
        FSMC_NORSRAMTimingInitStructure.FSMC_DataSetupTime = 4;//4
        FSMC_NORSRAMTimingInitStructure.FSMC_BusTurnAroundDuration = 0;//
        FSMC_NORSRAMTimingInitStructure.FSMC_CLKDivision = 2;//0
        FSMC_NORSRAMTimingInitStructure.FSMC_DataLatency = 0;//
        FSMC_NORSRAMTimingInitStructure.FSMC_AccessMode = FSMC_AccessMode_A;

        FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM1;
        FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Enable;
        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;//Enable
        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);
        FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM1, ENABLE);

恳请高手支招啊!
沙发
L_686|  楼主 | 2014-9-29 10:02 | 只看该作者
在线等啊

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3

主题

11

帖子

0

粉丝