Skip to main content
Explorer
December 28, 2024
Solved

ADDR10 flag is set when sending 7 bit address

  • December 28, 2024
  • 1 reply
  • 631 views

I am using LL library on STM32F446 for an I2C master, I am trying to comunicate with a device with 0x7B address, after sending the address I don't get the ADDR flag, insted I get ADDR10
Here is my interrupt code:

 if (LL_I2C_IsActiveFlag_SB(I2C1)) {
 LL_I2C_TransmitData8(I2C1, 0x7B << 1);
 }
 if (LL_I2C_IsActiveFlag_ADD10(I2C1)) {
 LL_I2C_TransmitData8(I2C1, 12);
 }

With this code I successfully send the "12" value.
Here logic analizer's output:

Dioswilson_0-1735422639975.png
If I try to detect ADDR "0C" byte is never sent. How could I fix this issue (I could just keep checking ADDR10, but subopimal)

 

    This topic has been closed for replies.
    Best answer by TDK

    Note that 0x7B is a reserved address and isn't a valid 7-bit address. Perhaps the chip you are interfacing with is set up for 10-bit addresses. In which case you should send the second byte of the 10-bit address in response to the ADD10 flag.

    TDK_0-1735612244826.png

    Addressing - I2C Bus

     

    It's not clear if setting ADDMODE bit is required to start 10-bit addressing, or if sending the header 0b11110xxx initiates 10-bit address mode as a master. My guess from reading the RM is the latter.

    1 reply

    TDKAnswer
    Super User
    December 31, 2024

    Note that 0x7B is a reserved address and isn't a valid 7-bit address. Perhaps the chip you are interfacing with is set up for 10-bit addresses. In which case you should send the second byte of the 10-bit address in response to the ADD10 flag.

    TDK_0-1735612244826.png

    Addressing - I2C Bus

     

    It's not clear if setting ADDMODE bit is required to start 10-bit addressing, or if sending the header 0b11110xxx initiates 10-bit address mode as a master. My guess from reading the RM is the latter.