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.

About operating the I2C on C6713 as master

Other Parts Discussed in Thread: BQ32000

I'm trying to establish I2C communication between the C6713(as master) and a bq32000(as slave, RTC product in ti).

so i made a code as below for operating i2c init procedure.

/*** i2c init ***/

*I2CMDR = 0x00;
for(i = 0; i < 5000; i++);
*I2CCLKH = 0x00;
*I2CCLKL = 0x00;
*I2CIER = 0x00;
*I2CSAR = 0xD0;
*I2CMDR = 0x630;

/*** end ***/

then, I don't know the way that read the data from bq32000.

Is it correct the i2c init code? and Is there any sample code of using the i2c for doing read/write operating.

for reference I used the CCS5.

Regard

Chun

  • Dear Chun,
    Please refer to the following e2e post.
    e2e.ti.com/.../1226995

    processors.wiki.ti.com/.../I2C_Tips


    then, I don't know the way that read the data from bq32000.

    You have to refer the bq32000 data sheet to understand the register what they have to access the BQ32000.
    BQ32000 device seems to be RTC device, so if you want to read the seconds, minutes, sec and initiate the alarm etc., it has some registers to read those information.

    www.ti.com/.../bq32000.pdf
    Refer page no 12, section 7.6 Register maps.
    Ex:
    Through register 0x03, you can get the saved day information when you read.
  • Hi,

    If you suspect I2C communication issue, you could test the I2C signal just between the I2C pins of BQ32000 and the local GND plane to check the real signals into the device. Normally the I2C line has low impedance and should be fine to go some distance.

    I think, to know more info. on how to read the data from bq32000, it would be recommended that to post your request in motor drivers forum with reference to BQ32000 I2C communication queries.

    Thanks & regards,

    Sivaraj K

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

    Please click the Verify Answer button on this post if it answers your question

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

  • Dear Titus.

    Thanks for replaying .

    but i don't understand about the prescaled module clock.
    i designed the rtc module(bq32000) with a crystal(32.768kHz).
    then do i set the I2CPSC register for my situation?

    and dsp is operated the 200Mhz.
    i don't know how many value do i set the I2CPSC.

    Regards,

    Chun.
  • Dear Chun,
    That I2C clock settings for I2C controller of C6713 and not for slave devices. (bq32000)

    Please refer to the below e2e post which has some i2c code for C6713.
    e2e.ti.com/.../1226995