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.

Linux/TMS320DM8148: Reading block from i2c

Part Number: TMS320DM8148

Tool/software: Linux

  hello ,

    We  need to supply a driver   for  the bosch  bno55 gyro  sensor .

    This device requires  burst  or block read  from i2c  .

     How  can i do it ?

    Should  i use the SMbus  facility  or not , and if yes how ?

     Is there an example for that ?

  Regards .

 

 

 

 

  • HI, 

    What is the size of the data buffer you want to read?  What is data rate? 

    Please note that You can use I2C driver to read the API from the sensor, but I2C FIFO size is the limit for single read. 

    Your application needs to handle this. 

     

    Thanks 

  • Thank you HV for your answer .

    The data raty we are using is 400KHz and the FIFO size that will do the work is 32 bytes .

    But ' i did not understand the answer , does the driver of the DM_8148 ( file "i2c_core.c" ) support multiple read or not .

    And if the answer is not where can i find example code that does the same ?

    Regards .
  • Hi Shlomo,

    As Ravikiran state, there is I2C built in FIFO (32 bytes) for buffered read or write. You can use that FIFO for your multiple/burst/block read. For more info on how this FIFO works check DM814x TRM, section 15.2.13 FIFO Management

    DM814x I2C linux kernel driver (i2c-omap.c) support using of that FIFO, see registers usage of I2C_BUF and I2C_BUFSTAT

    linux-kernel/drivers/i2c/busses/i2c-omap.c

    See also if below e2e thread will be in help:
    e2e.ti.com/.../608764

    Regards,
    Pavel
  • Thank you Pavel and Ravikiran ,

    As you said 'Pavel ' after investigation i found out exacly what you stated .

    Regards , Shlomo.