打印
[STM32F4]

STM32F407ZET6系统非复用方式扩展开启异步等待模式程序被更改

[复制链接]
180|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
STM32F407ZET6系统(168M AHB 时钟)非复用方式扩展一片IS62WV51216BLL-55,不能完全正确读写操作,找原因过程中,错误开启了异步等待模式
FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable;  //该语句被改为Enable,

下载运行后,死了,重新上电软件也不再执行,也不能重新下载代码,已经找不到器件


  • void FSMC_Config(void)
  • {
  •          FSMC_NORSRAMInitTypeDef  FSMC_NORSRAMInitStructure;
  •          FSMC_NORSRAMtimingInitTypeDef  p;
  •          RCC_AHB3PeriphClockCmd(RCC_AHB3Periph_FSMC, ENABLE);
  •          p.FSMC_AddressSetupTime = 5;
  •          p.FSMC_AddressHoldTime = 0;
  •          p.FSMC_DataSetupTime = 12;
  •         p.FSMC_BusTurnAroundDuration = 0;
  •         p.FSMC_CLKDivision = 0;
  •         p.FSMC_DataLatency = 0;
  •         p.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_AsynchronousWait = FSMC_AsynchronousWait_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 = &p;
  •    FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p;
  •    FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure);
  •    FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM3, ENABLE);
  • }


[color=rgb(51, 102, 153) !important]复制代码

使用特权

评论回复
沙发
两只袜子| | 2024-2-10 18:02 | 只看该作者
使用调试器来单步调试你的代码,并监视寄存器的状态。

使用特权

评论回复
板凳
jcky001| | 2024-2-10 18:03 | 只看该作者
你有没有意外地更改了其他配置寄存器

使用特权

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

本版积分规则

418

主题

1573

帖子

4

粉丝