Skip to main content
Visitor II
June 19, 2007
Question

EMI_BCLK signal do not work!?

  • June 19, 2007
  • 2 replies
  • 705 views
Posted on June 19, 2007 at 07:09

EMI_BCLK signal do not work!?

    This topic has been closed for replies.

    2 replies

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:44

    Hello ,

    I have CPU version STR912FAZ42, which is packaged in LFBGA144 and so it has connected pin EMI_BCLK on output pin M8.

    And now the question:

    Did anyone bring EMI_BCLK signal into run? I configured EMI into 8-bit non-multiplexed mode, but still no clock signal running on EMI_BLCK pin. :-?

    See my code bellow (Note, that before calling this piece of code the CPU is configured and succesfully running and my AHB bus clock is HCLK=96MHz):

    Quote:

    /* EMI SCU config */

    EMI_DeInit();

    SCU_AHBPeriphClockConfig(__EMI,ENABLE);

    SCU_AHBPeriphClockConfig(__EMI_MEM_CLK,ENABLE);

    SCU_AHBPeriphReset(__EMI,DISABLE);

    SCU_AHBPeriphIdleConfig(__EMI,DISABLE);

    SCU_AHBPeriphIdleConfig(__EMI_MEM_CLK,DISABLE);

    SCU_AHBPeriphDebugConfig(__EMI,DISABLE);

    SCU_AHBPeriphDebugConfig(__EMI_MEM_CLK,DISABLE);

    SCU_EMIModeConfig(SCU_EMI_DEMUX);

    SCU_EMIBCLKDivisorConfig(SCU_EMIBCLK_Div2);

    /* connect GPIO P8 and P9 to EMI block */

    GPIO_EMIConfig(ENABLE);

    /* Init EMI */

    EMI_InitTypeDef emi;

    EMI_StructInit(&emi);

    emi.EMI_Bank_IDCY = 0x1;

    emi.EMI_Bank_WSTRD = 0x1;

    emi.EMI_Bank_WSTWR = 0x1;

    emi.EMI_Bank_WSTROEN = 0x1;

    emi.EMI_Bank_WSTWEN = 0x1;

    emi.EMI_Bank_MemWidth = EMI_Width_Byte;

    emi.EMI_Bank_WriteProtection = EMI_Bank_NonWriteProtect;

    emi.EMI_PageModeRead_TransferLength = EMI_8Data;

    emi.EMI_PageModeRead_Selection = EMI_NormalMode;

    EMI_Init(EMI_Bank0,&emi);

    Thanks 8-)

    Jan

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:44

    Ok, I got response from ST support centre ;)

    Resolving the problem with EMI_BCLK signal is simple. My configuration code as you can see in my previous post has been OK. But minimally one read or write access to EMI interface must be done before the EMI_BCLK signal is running continuously. So you can add the following dummy read command to the end of previous configuration:

    Code:

    /* to activate EMI BCLK minimaly one read (or write) cycle must occur */

    u32 emival = *(u32 *)0x3C000000;

    and EMI_BCLK signal is running (I can see 48 MHz square signal on oscilloscope on pin ''M8'').

    So the topic is closed by myself,

    cu in another one :)

    Jan