Mark de Jong

I2C Eeprom free clocking

Discussion created by Mark de Jong on Jun 24, 2008
Latest reply on Jun 26, 2008 by Guest
Hello all,
After getting the second I2C bus working on the MCF5251 (the port configuration was wrong).
I have a new problem:
For error handling with EEPROMs the appliction note says, to generate 9 start sequences followed by one stop sequence.
To generate this sequence I have tried following code:
        MBAR2_MBCR = MBCR_MTX | MBCR_IEN;            MBAR2_MBCR |=  MBCR_MSTA;                /* generate start */        for (loop = 0; loop < 8; loop++)        {            MBAR2_MBCR |=  MBCR_RSTA;            /* generate restart */        }                MBAR2_MBCR &= ~MBCR_MSTA;                /* generate stop */        MBAR2_MBCR = 0;        MBAR2_MBCR = MBAR2_MBCR | MBCR_IEN;

It works when I single step through it, but not when running real-time, what am I doing wrong.
Regands Mark,