This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem in EEPROM read

Other Parts Discussed in Thread: OMAP3530

Hi All,

         I'm a fresher.I added support for EEPROM read which is connected with i2c1 line.

         It is working fine with OMAP3530 processor board(both in u-boot and in kernel).

         It is working fine with OMAP3730 processor's kernel.But it gives timeout error in 3730's u-boot.While tranferring data,most of the times  it got struck in some byte.So acknowledgement has not  sent properly.So it gives wait for timeout pin error.

         From this case, i come to know that there is no problem with i2c1 lines.

         Though there is no more changes regarding i2c1 lines between OMAP3530 to OMAP3730,i got this error.

         i2c speed is exactly 100KHz.

         I confused a lot.Please any one help me on that issue.

         I attached the log file with this.Thanks in advance.

-------------------------------------------------------------------------------

 

# eeprom read 50 00 25

 

EEPROM @0x50 read: addr 00000050  off 0000  count 37 ...

timed out in wait_for_pin: I2C_STAT=0

I2C read: I/O error

done

 

----------------------------------------------------------------------------------------

Regards,
rajee sankar

  • Note that this is a Stellaris forum - you are likely to get better responses if you ask in an OMAP forum!

  • am using Concerto F28M35x card.......am trying to read/write the data EEPROM ........after writing if i read the data from EEPROM it is showinf 0xFF .........can any1 help me to slove this

    this is my code

    #define EEPROM_ADDRESS 0x50

    void simplewrite(unsigned char data);
    long simpleread();

    unsigned long result;

    int
    main(void)
    {
        unsigned char data = 'a';
        HWREG(SYSCTL_MWRALLOW) =  0xA5A5A5A5;
        SysCtlClockConfigSet(SYSCTL_SYSDIV_1 | SYSCTL_M3SSDIV_2 | SYSCTL_USE_PLL |
                             (SYSCTL_SPLLIMULT_M & 0x0F));
        SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C0);
        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
        GPIOPinUnlock(GPIO_PORTB_BASE,GPIO_PIN_6);
        GPIOPinUnlock(GPIO_PORTB_BASE,GPIO_PIN_7);
        GPIOPinConfigure(GPIO_PB7_I2C0SCL);
        GPIOPinConfigure(GPIO_PB6_I2C0SDA);
        GPIOPinTypeI2C(GPIO_PORTB_BASE, GPIO_PIN_6 | GPIO_PIN_7);
        HWREG(I2C0_MASTER_BASE + I2C_O_MCR) |= I2C_MCR_MFE;
        I2CMasterInitExpClk(I2C0_MASTER_BASE, SysCtlClockGet(SYSTEM_CLOCK_SPEED), false);
        I2CMasterEnable(I2C0_MASTER_BASE);

        simplewrite(data);
        result=simpleread();

    }

    void simplewrite(unsigned char data)
    {
        I2CMasterSlaveAddrSet(I2C0_MASTER_BASE, EEPROM_ADDRESS, false);
        I2CMasterDataPut(I2C0_MASTER_BASE, data);
        I2CMasterControl(I2C0_MASTER_BASE, I2C_MASTER_CMD_SINGLE_SEND);
        while (I2CMasterBusy(I2C0_MASTER_BASE)) {
        }
    }

    long simpleread()
    {
        I2CMasterSlaveAddrSet(I2C0_MASTER_BASE, EEPROM_ADDRESS, false);
        I2CMasterControl(I2C0_MASTER_BASE, I2C_MASTER_CMD_BURST_SEND_START);
        while (I2CMasterBusy(I2C0_MASTER_BASE)) {
        }
        I2CMasterSlaveAddrSet(I2C0_MASTER_BASE, EEPROM_ADDRESS, true);
        I2CMasterControl(I2C0_MASTER_BASE, I2C_MASTER_CMD_SINGLE_RECEIVE);
        while(I2CMasterBusy(I2C0_MASTER_BASE)){}
        return( I2CMasterDataGet(I2C0_MASTER_BASE));
    }

    thank in advance

  • Chandni ,

    Just a thought -- Did you make sure that the write to EEPROM happened , may be by probing the GPIO or something.....It does look like its reading the default value at the ROM memory...?? (adrress indexing seems to be right..) ...just thinking :)