cancel
Showing results for 
Search instead for 
Did you mean: 

ADDR10 flag is set when sending 7 bit address

Dioswilson
Associate III

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)

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

1 REPLY 1
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".