各路大神, 我在用STM32F4的FSMC驱动TFT时,发现NE1的输出信号有点奇怪。请问各位会出现这种情况吗?还是我的配置有问题??后来我用手中的103也看了下输出的波型, 使能时并没发现有图中的突起信号。请求各路大神帮忙解答下,谢谢~~
如图:
配置:
GPIO_InitTypeDef GPIO_InitStruct;
FSMC_NORSRAMInitTypeDef FSMC_InitStruct;
FSMC_NORSRAMTimingInitTypeDef FSMC_ReadTiming;
FSMC_NORSRAMTimingInitTypeDef FSMC_WriteTiming;
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_7
|GPIO_Pin_8|GPIO_Pin_9|GPIO_Pin_10|GPIO_Pin_14|GPIO_Pin_15|GPIO_Pin_11;
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF; /*>¸´Óù¦ÄÜ */
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_DOWN;
GPIO_InitStruct.GPIO_Speed = GPIO_Fast_Speed; /*>50MHz */
GPIO_Init(GPIOD, &GPIO_InitStruct);
GPIOD->AFR[0] = (GPIOD->AFR[0]&(0X0F00FF00))|0XC0CC00CC;
GPIOD->AFR[1] = (GPIOD->AFR[1]&(0X00FF0000))|0XCC00CCCC;
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_7|GPIO_Pin_8|GPIO_Pin_9|GPIO_Pin_10|GPIO_Pin_11
|GPIO_Pin_12|GPIO_Pin_13|GPIO_Pin_14|GPIO_Pin_15;
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF; /*>¸´Óù¦ÄÜ */
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_DOWN;
GPIO_InitStruct.GPIO_Speed = GPIO_Fast_Speed; /*>50MHz */
GPIO_Init(GPIOE, &GPIO_InitStruct);
GPIOE->AFR[0] = (GPIOE->AFR[0]&(0X0FFFFFFF))|0XC0000000;
GPIOE->AFR[1] = (GPIOE->AFR[1]&(0X00000000))|0XCCCCCCCC;
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_12;
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT; /*>¸´Óù¦ÄÜ */
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_InitStruct.GPIO_Speed = GPIO_Low_Speed; /*>50MHz */
GPIO_Init(GPIOD, &GPIO_InitStruct);
FSMC_ReadTiming.FSMC_AccessMode = FSMC_AccessMode_B ;
FSMC_ReadTiming.FSMC_AddressHoldTime = 0x0F;
FSMC_ReadTiming.FSMC_AddressSetupTime = 0x0F;
FSMC_ReadTiming.FSMC_BusTurnAroundDuration = 0x00;
FSMC_ReadTiming.FSMC_DataSetupTime = 0x20;
FSMC_WriteTiming.FSMC_AccessMode = FSMC_AccessMode_B ;
FSMC_WriteTiming.FSMC_AddressHoldTime = 15;
FSMC_WriteTiming.FSMC_AddressSetupTime = 15;
FSMC_WriteTiming.FSMC_BusTurnAroundDuration = 0x00;
FSMC_WriteTiming.FSMC_DataSetupTime = 0x15;
FSMC_WriteTiming.FSMC_DataLatency = 0x0f;
FSMC_InitStruct.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable ;
FSMC_InitStruct.FSMC_Bank = FSMC_Bank1_NORSRAM1;
FSMC_InitStruct.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable;
FSMC_InitStruct.FSMC_DataAddressMux = FSMC_DataAddressMux_Enable;
FSMC_InitStruct.FSMC_ExtendedMode = FSMC_ExtendedMode_Enable;
FSMC_InitStruct.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b;
FSMC_InitStruct.FSMC_MemoryType = FSMC_MemoryType_NOR;
FSMC_InitStruct.FSMC_WriteBurst = FSMC_WriteBurst_Disable;
FSMC_InitStruct.FSMC_WriteOperation = FSMC_WriteOperation_Enable;
FSMC_InitStruct.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low;
FSMC_InitStruct.FSMC_WrapMode = FSMC_WrapMode_Disable;
FSMC_InitStruct.FSMC_WaitSignal = FSMC_WaitSignal_Disable;
FSMC_InitStruct.FSMC_ReadWriteTimingStruct = &FSMC_ReadTiming;
FSMC_InitStruct.FSMC_WriteTimingStruct = &FSMC_WriteTiming;
FSMC_NORSRAMInit(&FSMC_InitStruct);
FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM1, ENABLE);
|