2011-07-11 10:21:57     BF 527 TWI(I2C) transfer time out

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-07-11 10:21:57     BF 527 TWI(I2C) transfer time out

Alif Khan (INDIA)

Message: 102319   

 

Hi,

 

I'm working with 2010R1 toolchain and distribution in BF527 custom board.

 

I  used these below APIs for I2C Read &Write communication from the user space

__s32 i2c_smbus_read_byte_data(int file, __u8 command);

__s32 i2c_smbus_write_byte_data(int file, __u8 command, __u8 value);

 

__s32 i2c_smbus_read_block_data(int file, __u8 command, __u8 *values);

__s32 i2c_smbus_write_block_data(int file, __u8 command, __u8 length,   __u8 *values);

 

When I worked with these APIs in stand alone project(just write and read the regs) its working fine but when I try to worked with Application framework I am getting

 

"i2c i2c-0: smbus transfer timeout"  error status frequently.

 

 

 

Please could anyone tell whether i've missed out anything or need any time delay needs to be updated.

 

 

 

Thanks in Advance

QuoteReplyEditDelete

 

 

2011-07-11 22:57:13     Re: BF 527 TWI(I2C) transfer time out

Aaron Wu (CHINA)

Message: 102331   

 

we have example using the same interface in user/blkfin-test/twi_lcd-test/twilcd_userspace_test.c and it's working fine.  Since it's working fine stand alone and fails only in your App framework guess you may need check what's the diffrence, or consult the i2C/SMBUS upstream

QuoteReplyEditDelete

 

 

2011-07-15 01:24:33     Re: BF 527 TWI(I2C) transfer time out

Alif Khan (INDIA)

Message: 102413   

 

Hi Aaron thanks for your information.

 

We searched  this twilcd_userspace_test.c file in this path  user/blkfin-test/twi_lcd-test but its not available.

 

Actually we want to read/write 256 bytes of data by using block read/write ,could you please suggest which I2C write/read  API is suitable for bulk data transfer(256 bytes) .

 

Thanks in advance

QuoteReplyEditDelete

 

 

2011-07-15 02:25:42     Re: BF 527 TWI(I2C) transfer time out

Aaron Wu (CHINA)

Message: 102415   

 

Then your SVN revision should be old, try svn up, I checked it's there.

Attachments

    Outcomes