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.

CCS/CC2640R2F: I2C Address Got corrupted/Shifted

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2640

Tool/software: Code Composer Studio

Hi all,

I am trying to implement a CC2640 to communicate with a external RTC via I2C. 

Funny thing happened that I was trying to use a slave address of 11011110, but on the scope there showed 10111100, and the following data bytes are correct. It seems somehow the address byte got corrupted like shifted to left by one bit. 

I also tried use address of 11111111, scope showed 11111110; used 10101010, scope showed 01010100.

Anyone met similar situation before? Any additional settings to correct this?

Thanks.

  • Hello,

    Are you sure it's not using 7-bit addressing?

    Best wishes
  • Hi JXS,

    What I am trying to send and receive via I2C is:

    Here are my I2C part codes:

    As you can see I set the WADDR as CONTROL BYTE 0xDE (11011110), txBuffer as ADDRESS BYTE 0x01 (00000001) in the write part; RADDR as CONTROL BYTE 0xDF (11011111), rxBuffer as DATA BYTE. 

    What I got on the scope are:

    WADDR as 10111100 (incorrect):

    txBuffer as 00000001 (correct):

    RADDR as 10111111 (incorrect):

    Anything I did wrong lead this error?

    Thanks

  • Hi Bulbthree,

    Take a look at section 21.3.1.2 in the Technical Reference Manual: www.ti.com/lit/pdf/swcu117. The I2C module uses 7 bit addressing as Jeff says. The last, 8th, bit is the data direction bit. This last bit is appended automatically by the driver/HW. In other words, when you input an 8 bit address, a 9th bit is appended to this and the 8 LSBs are used.

    Your I2C addresses should thus be 7 bits long and not include the R/S bit.

    Cheers,
    Fredrik
  • Thanks Fredrik and Jeff