How to enable continuous BCLK of EIM interface in i.MX7

Hi,

We are developing a smart device application on Visual studio for i.MX7D device using TORADEX SDK and SOM on Colibri i.MX7 EVK board with Win CE 7.

We are using EIM interface for one of our application and want to enable the continuous BCLK. We are using the EIM in Synchronous Burst mode.

As per the reference guide of i.MX7, When Bit 3( CONT_BCLK_SEL) of EIM_WCR register is set BCLK pin output continuous clock. We configured the register with this value but BCLK output was not continuous. In fact there was no impact of configuring this pin.

Please guide us to achieve this functionality.

Regards
Bipin Kumar

Have you configured X1 pin 152 as an AltFn=4 ?

Yes I have configured X1 pin 152 as AltFn=4.

Please find below EIM IO configuration that we have used in our code.

BOOL Eim_ConfigureIos( HANDLE hGpio )
{    
    BOOL fSuccess = TRUE;
	int index;
 
    const uIo eimIo[] =
    {		
        COLIBRI_PIN( 89),   // RW
        COLIBRI_PIN( 91),   // OE
        COLIBRI_PIN(105),   // CS0_B
        COLIBRI_PIN(150),   // LBA_B
        COLIBRI_PIN(152),   // BCLK
        COLIBRI_PIN(111),   // AD0
        COLIBRI_PIN(113),   // AD1
        COLIBRI_PIN(115),   // AD2
        COLIBRI_PIN(117),   // AD3
        COLIBRI_PIN(119),   // AD4
        COLIBRI_PIN(121),   // AD5
        COLIBRI_PIN(123),   // AD6
        COLIBRI_PIN(125),   // AD7
        COLIBRI_PIN(110),   // AD8
        COLIBRI_PIN(112),   // AD9
        COLIBRI_PIN(114),   // AD10
        COLIBRI_PIN(116),   // AD11
        COLIBRI_PIN(118),   // AD12
        COLIBRI_PIN(120),   // AD13
        COLIBRI_PIN(122),   // AD14
        COLIBRI_PIN(124)    // AD15
    };
 
    /// The EIM functionality is on Alternate Function 4 for all EIM pins.
    for ( index = 0; index < _countof(eimIo); index++)
	{
        fSuccess &= Imx7Gpio_SetConfigString(hGpio, eimIo[ index ], NULL, L"AltFn=4", StoreVolatile);
	}
 
    return fSuccess;
}

Could you attach a minimal but full and compilable source code for pin configuration and CONT_BCLK_SEL setting?

Hi Alex,

I have added the source code(TEST_EIM project) for your reference.
In this code I am continuously writing 16 bit data on address 512 on EIM bus in interval of 5 seconds. EIM is configured in Synchronous Burst mode. I have also SET the CONT_BCLK_SEL bit of EIM_WCR register.

In this application before writing to EIM bus, continuous BCLK is coming on BCLK pin. But once data is written to EIM bus, continuous BCLK stops, It comes only when data is written. I have captured the first instance of CS and BCLK when application starts and attached the EIM_20210617-0001.psdata file for your reference. I have captured these signals using Picoscope, You need to download and install Picoscope 6 software to view EIM_20210617-0001.psdata file. In this, signal D2 is BCLK and D6 is CS0.

One more thing we have observed, If we run this application and just disable the EIM writing( Comment line 61 EIM_writeWord( 512, 0x1010 ); ) then continuous BCLK can be seen on BCLK pin.

Regards
Bipin Kumar

link text

Sorry, but I have no time to install and learn Picoscope 6 software. Could you please post a picture?

It looks like expected behavior.

NOTE
The BCLK signal toggles only when burst access is executed
toward the external device (BCM=1’b0 for normal mode use). It
runs with a 50% duty cycle until the end of access is reached.
When access is terminated, BCLK stops toggling.

i.MX 7Dual Applications Processor Reference Manual