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.

OMAP4 - i2c1 read problem

Other Parts Discussed in Thread: TWL6030

Hello,
 
I am working on porting omap3 code to omap4430sdp board.
Booting from eMMC is fine.
The serial port(using uart4) is up.
 
Right now I am facing problem with i2c1 read (i2c write is working fine).
My i2c1 slave device is TWL6030 (address 0x49).
I am trying to read battery ADC(reg offset 0x35) and SOC (0x37) value using i2c read before enabling usb charging.
My i2c1 STAT is coming as 0x114 (ARDY, XRDY, BF). But RRDY bit is not getting set.
Log Message is show below:-
I2C1 Slave Address I2C1_SA = 0x49
i2c1_read_word >>>> wait_for_pin  : status = 0x114
wait_for_pin :  [i2c1-TIMEOUT] :  I2C_STAT(1)=0x0
[ERROR] : i2c1_read_word : Not - STAT_RRDY, status=0x0
 
I dont know what is the problem.
The same code works on omap3430 board using dev address as 0x36 and regoffset value as 0x2 for ADC and 0x4 for SOC.
 
I am initializing the i2c1 correctly.
I am setting the clock control like this :-
REG32(CM_L4PER_I2C1_CLKCTRL) |= 0x2; 
I am setting the PADCONF like this:-
 REG16(PAD_I2C1_SCL) |= (PAD_MODE0 | (1<<3) | (1<<4) | (1<<8));  //M0, Pull Enable, Pull Select, Input enable
 REG16(PAD_I2C1_SDA) |= (PAD_MODE0 | (1<<3) | (1<<4) | (1<<8));  //M0, Pull Enable, Pull Select, Input enable
 
 
I am stuck here from longtime.
Please let me know how to fix this i2c read problem.
 
 
 
Thanks, Regards
Pintu
  • Hi Pintu,

     

    Please note that, in general, OMAP4 topics are not covered in these forums.  This is because OMAP4 is currently limited to high-volume wireless OEMs and ODMs.  Please refer to the availability disclaimer on the OMAP4 Product Platform Page: 

     

    Availability Disclaimer
    This product is intended for high-volume wireless OEMs and ODMs and is not available through distributors. If your company meets this description, please contact your TI sales office. For OMAP products now available for all customers and applications, please click here.

     

    Regards,

    Lawrence