Commit 3bfd36ef authored by Yannis Damigos's avatar Yannis Damigos Committed by Anas Nashif
Browse files

i2c_ll_stm32_v2: Send STOP manually after NACK



In master trasmitter mode AutoEndMode is
always disabled, so we need to send STOP
manually if NACK is received.

Fixes #19059

Signed-off-by: default avatarYannis Damigos <giannis.damigos@gmail.com>
parent 2f507cd9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -286,7 +286,12 @@ static void stm32_i2c_event(struct device *dev)
	if (LL_I2C_IsActiveFlag_NACK(i2c)) {
		LL_I2C_ClearFlag_NACK(i2c);
		data->current.is_nack = 1U;
		goto end;
		/*
		 * AutoEndMode is always disabled in master mode,
		 * so send a stop condition manually
		 */
		LL_I2C_GenerateStopCondition(i2c);
		return;
	}

	/* STOP received */