2006-08-09 06:01 AM
2011-05-17 12:31 AM
Hi,
I'm working with IAR compiler and the jlink debugger stop to work when I try to access to the external memory area anyone has experience how to configure the EMI bus to access in 16bit mode? do you now if there is any app.note that explain how to configure the EBI?2011-05-17 12:31 AM
what's wrong in this piece of code ?
I didn't able to work with external bus :( I'd like to configure external bus as 16bit data & address with CS3. #define _EMI_Mode SCU_EMI_MUX #define _EMI_Bank_MemWidth EMI_Width_HalfWord // 16 bits width #define _EMI_ALE_Length SCU_EMIALE_LEN1 #define _EMI_ALE_Polarity SCU_EMIALE_POLHigh #define _EMI_CLK_Divisor SCU_EMIBCLK_Div2 // EMI divisor = 2 #define _EMI_Bank3_RD_WS 4 // read wait state #define _EMI_Bank3_OE_WS 3 // output enable assertion delay #define _EMI_Bank3_WR_WS 2 // write wait state #define _EMI_Bank3_WEN_WS 2 // write enable assertion delay #define _EMI_Bank3_IDCY 2 // bus turnaround cycle EMI_InitTypeDef EMI_InitStruct; EMI_DeInit(); EMI_StructInit(&EMI_InitStruct); SCU_AHBPeriphDebugConfig(__EMI_MEM_CLK, ENABLE); GPIO_EMIConfig(ENABLE); SCU_EMIModeConfig(_EMI_Mode); SCU_EMIALEConfig(_EMI_ALE_Length, _EMI_ALE_Polarity); SCU_EMIBCLKDivisorConfig(_EMI_CLK_Divisor); EMI_InitStruct.EMI_Bank_IDCY = _EMI_Bank3_IDCY; EMI_InitStruct.EMI_Bank_WSTRD = _EMI_Bank3_RD_WS; EMI_InitStruct.EMI_Bank_WSTWR = _EMI_Bank3_WR_WS; EMI_InitStruct.EMI_Bank_WSTROEN= _EMI_Bank3_OE_WS; EMI_InitStruct.EMI_Bank_WSTWEN= _EMI_Bank3_WEN_WS; EMI_InitStruct.EMI_Bank_MemWidth= _EMI_Bank_MemWidth; EMI_Init (EMI_Bank3,&EMI_InitStruct);2011-05-17 12:31 AM
Hi,
I don't see in your code the configuration of EMI_CS3n (P7.4), in fact this pin after RESET is configured as GPIO and should be configured as Alternate OUTPUT3. Regards, STARM2011-05-17 12:31 AM
sorry!!
I forgot to attach the declaration of the GPIOs configuration. In any case all the pins used for the ext bus are configured in the right way (GPIOOUT7 0x0346 // CS3 - A16 - P71 out - P72 irq) Today I modify the RD&WD WAITSTATE now RD = 5 WD = 4 With these settings the bus is working :-] I don't know way.... for the moment is enought for me !!