2008-04-09 04:55 PM
EMI with 8bit data and 24 bit address
2011-05-17 12:48 AM
Hi!
Is is possible to use EMI with 8bit data and 24 bit address? Usermanual doesn't say anything about this configuration.2011-05-17 12:48 AM
Hi.
It is possible. I used EMI by 8bit Data, 18bit(A0~A17) Address. I write my source code for EMI Initialize. ------------------------------------------------------------------- /*** EMI Initialize : External memory interface Bank0 (nCS0) : SRAM Bank1 (nCS1) : TL16C554 4EA Bank2 (nCS2) : W5100(WIZNET) */ void EMI_Initialize(void) { SCU_AHBPeriphClockConfig(__EMI, ENABLE); SCU_AHBPeriphClockConfig(__EMI_MEM_CLK, ENABLE); SCU_AHBPeriphReset(__EMI,ENABLE); SCU_AHBPeriphReset(__EMI_MEM_CLK,ENABLE); EMI_DeInit(); GPIO_EMIConfig(ENABLE); SCU_EMIBCLKDivisorConfig(SCU_EMIBCLK_Div2); SCU_EMIModeConfig(SCU_EMI_MUX); SCU_EMIALEConfig(SCU_EMIALE_LEN2,SCU_EMIALE_POLHigh); GPIO_InitStructure.GPIO_Direction = GPIO_PinOutput; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All; GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull ; GPIO_InitStructure.GPIO_IPInputConnected = GPIO_IPInputConnected_Disable; GPIO_InitStructure.GPIO_Alternate = GPIO_OutputAlt2; GPIO_Init (GPIO8, &GPIO_InitStructure); GPIO_Init (GPIO9, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Direction = GPIO_PinOutput; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_7; //P7.7[CS0] GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull ; GPIO_InitStructure.GPIO_IPInputConnected = GPIO_IPInputConnected_Disable; GPIO_InitStructure.GPIO_Alternate = GPIO_OutputAlt2; GPIO_Init (GPIO7, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Direction = GPIO_PinOutput; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_6; // P7.6[CS1] GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull ; GPIO_InitStructure.GPIO_IPInputConnected = GPIO_IPInputConnected_Disable; GPIO_InitStructure.GPIO_Alternate = GPIO_OutputAlt3; GPIO_Init (GPIO7, &GPIO_InitStructure); EMI_StructInit(&EMI__InitStructure); EMI__InitStructure.EMI_Bank_IDCY = 0x0F; //0~0x0f EMI__InitStructure.EMI_Bank_WSTRD = 0x1F; //0~0x1f; EMI__InitStructure.EMI_Bank_WSTWR = 0x1F; //0~0x1f; EMI__InitStructure.EMI_Bank_WSTROEN = 0x0F; //0~0x0f EMI__InitStructure.EMI_Bank_WSTWEN = 0x0F; //0~0x0f; /// Bank0 EMI__InitStructure.EMI_Bank_MemWidth = EMI_Width_Byte; //8 bit EMI__InitStructure.EMI_Bank_WriteProtection = EMI_Bank_NonWriteProtect; EMI__InitStructure.EMI_Burst_and_PageModeRead_TransferLength = EMI_Read_8Data; EMI__InitStructure.EMI_Burst_and_PageModeRead_Selection = EMI_NormalMode; EMI_Init( EMI_Bank0,&EMI__InitStructure); //Bank0-->SRAM /// Bank1 EMI__InitStructure.EMI_Bank_MemWidth = EMI_Width_Byte; //8 bit EMI__InitStructure.EMI_Bank_WriteProtection = EMI_Bank_NonWriteProtect; EMI__InitStructure.EMI_Burst_and_PageModeRead_TransferLength = EMI_Read_8Data; EMI__InitStructure.EMI_Burst_and_PageModeRead_Selection = EMI_NormalMode; EMI_Init( EMI_Bank1,&EMI__InitStructure); //Bank1-->TL16C554 /// Bank2 // EMI__InitStructure.EMI_Bank_MemWidth=EMI_Width_Byte; //8 bit // EMI__InitStructure.EMI_Bank_WriteProtection=EMI_Bank_NonWriteProtect; // EMI__InitStructure.EMI_PageModeRead_TransferLength=EMI_8Data; // EMI__InitStructure.EMI_PageModeRead_Selection=EMI_NormalMode; // EMI_Init( EMI_Bank2,&EMI__InitStructure); //Bank2-->W5100 }