回复【4楼】 正点原子 :
---------------------------------
因为我设置的DMA buffer为 DMA_DoubleBufferModeConfig(DMA2_Stream1, Bank1_SRAM3_ADDR+(0x4b00*4),DMA_Memory_0); //DMA double buffer configure
双缓存,所以,可以在缓存同时对数据操作,应该不会被覆盖。
这个花屏问题我通过修改FSMC的设置,解决了!
p.FSMC_AddressSetupTime = 0;
p.FSMC_AddressHoldTime = 0;
p.FSMC_DataSetupTime = 4;
// p.FSMC_AddressSetupTime = 1;
// p.FSMC_AddressHoldTime = 0;
// p.FSMC_DataSetupTime = 2;
上面注释的部分为原来FSMC的设置,改为上面的参数后,花屏问题解决了!
谢谢,原子的指教!

为什么,改了一下FSMC的这几个参数就没有花屏了呢?
揭秘:
右击,去看了一下这几个参数的definition,如下:
uint32_t FSMC_AddressSetupTime; /*!< Defines the number of HCLK cycles to configure
the duration of the address setup time.
This parameter can be a value between 0 and 0xF.
@note This parameter is not used with synchronous NOR Flash memories. */
uint32_t FSMC_AddressHoldTime; /*!< Defines the number of HCLK cycles to configure
the duration of the address hold time.
This parameter can be a value between 0 and 0xF.
@note This parameter is not used with synchronous NOR Flash memories.*/
uint32_t FSMC_DataSetupTime; /*!< Defines the number of HCLK cycles to configure
the duration of the data setup time.
This parameter can be a value between 0 and 0xFF.
@note This parameter is used for SRAMs, ROMs and asynchronous multiplexed NOR Flash memories. */
FSMC_AddressSetupTime,用来配置FSMC地址建立时间的长短;
FSMC_AddressHoldTime,用来配置FSMC地址保持时间的长短;
FSMC_DataSetupTime,用来配置数据建立时间的长短。
而STM32处理器正是通过FSMC(flexible static memory controller,可变静态存储控制器)总线来访问SRAM的,所以,FSMC的正确配置才能保证发出正确的地址、控制信号类型来匹配信号的速度。
仔细观察对FSMC配置的修改,只改了FSMC_AddressSetupTime=0和FSMC_DataSetupTime=4,也就是把FSMC地址建立时间缩短了和数据建立时间变长了,后来我又改为FSMC_AddressSetupTime=1而FSMC_DataSetupTime=4,即只把数据建立时间变长了,FSMC地址建立时间跟原来一样,结果跑了一下程序,花屏照样没有,说明之前花屏问题是因为数据建立的时间太短了,造成了像原子说出现了数据的覆盖吧!
是不是我分析的这样呢!请各位大神指正!谢谢!
|