今天突然心血来潮想让stm32f429的FMC同时挂TFT跟SDRAM,之前是没敢试,怕不稳定,TFT就一直用的IO模拟的,今天一开始还好的,但是后来调试不晓得是软件的问题还是IAR的问题了,老是出现这个图片上的问题,这种到底应该怎么解决啊??还有,我还怀疑是我的代码可能有一点问题,哪位仁兄能给我发一下429的FMC挂TFT的例程吗??在此拜谢了。。。
- void LCD_FMC_Config()
- {
- FMC_NORSRAMInitTypeDef FMC_NORSRAMInitStructure;
- FMC_NORSRAMTimingInitTypeDef FMC_NORSRAMTimingInitStructure;
- LCD_GPIO_Config();
- RCC_AHB3PeriphClockCmd(RCC_AHB3Periph_FMC, ENABLE);
- FMC_NORSRAMTimingInitStructure.FMC_AddressSetupTime=10;
- FMC_NORSRAMTimingInitStructure.FMC_AddressHoldTime=0;
- FMC_NORSRAMTimingInitStructure.FMC_DataSetupTime=10;
- FMC_NORSRAMTimingInitStructure.FMC_BusTurnAroundDuration=0;
- FMC_NORSRAMTimingInitStructure.FMC_CLKDivision=0;
- FMC_NORSRAMTimingInitStructure.FMC_DataLatency=0;
- FMC_NORSRAMTimingInitStructure.FMC_AccessMode=FMC_AccessMode_A;
-
- FMC_NORSRAMInitStructure.FMC_Bank=FMC_Bank1_NORSRAM1;
- FMC_NORSRAMInitStructure.FMC_DataAddressMux=FMC_DataAddressMux_Disable;
- FMC_NORSRAMInitStructure.FMC_MemoryType=FMC_MemoryType_SRAM;
- FMC_NORSRAMInitStructure.FMC_MemoryDataWidth=FMC_NORSRAM_MemoryDataWidth_16b;
- FMC_NORSRAMInitStructure.FMC_BurstAccessMode=FMC_BurstAccessMode_Disable;
- FMC_NORSRAMInitStructure.FMC_AsynchronousWait=FMC_AsynchronousWait_Disable;
- FMC_NORSRAMInitStructure.FMC_WaitSignalPolarity=FMC_WaitSignalPolarity_Low;
- FMC_NORSRAMInitStructure.FMC_WrapMode=FMC_WrapMode_Disable;
- FMC_NORSRAMInitStructure.FMC_WaitSignalActive=FMC_WaitSignalActive_BeforeWaitState;
- FMC_NORSRAMInitStructure.FMC_WriteOperation=FMC_WriteOperation_Enable;
- FMC_NORSRAMInitStructure.FMC_WaitSignal=FMC_WaitSignal_Disable;
- FMC_NORSRAMInitStructure.FMC_ExtendedMode=FMC_ExtendedMode_Disable;
- FMC_NORSRAMInitStructure.FMC_WriteBurst=FMC_WriteBurst_Disable;
- FMC_NORSRAMInitStructure.FMC_ReadWriteTimingStruct=&FMC_NORSRAMTimingInitStructure;
- FMC_NORSRAMInitStructure.FMC_WriteTimingStruct=&FMC_NORSRAMTimingInitStructure;
-
- FMC_NORSRAMInit(&FMC_NORSRAMInitStructure);
- FMC_NORSRAMCmd(FMC_Bank1_NORSRAM1,ENABLE);
- }