Question
STM32G051K6 and LL I2C sends all times 0x01 after Write to Slave
Hello,
i use a STM32G051K6 with LL Drivers and want to implement I2C. But all the time it sends Slave ID, 0x01, Byte 1, 2 and so on. Here i Call 0x38 Slave ID:

And here all Data:

And this my Code:
LL_I2C_TransmitData8(I2C1, 0x00);
LL_I2C_HandleTransfer(I2C1, 0x70, LL_I2C_ADDRSLAVE_7BIT, 3, LL_I2C_MODE_SOFTEND, LL_I2C_GENERATE_START_WRITE);
LL_mDelay(1);
for (int i = 0; i < 3; i++) {
while (!LL_I2C_IsActiveFlag_TXE(I2C1)); // Wait until the data register is empty
if (LL_I2C_IsActiveFlag_NACK(I2C1)) { // Check for NACK (Not Acknowledged)
return 1;
}
LL_I2C_TransmitData8(I2C1, i+10); //temp[i]); // Transmit data byte
LL_mDelay(1);
LL_I2C_ClearFlag_TXE(I2C1);
}
LL_I2C_GenerateStopCondition(I2C1);
LL_mDelay(1);
LL_I2C_ClearFlag_STOP(I2C1);I Hope you can help me with this Topic :)
BR rspecht
