mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
arch/arm/rp23xx: fix not restart after TX error
Fix a bug that I2C driver can not transfer after TX abort error.
It caused by remaining NO_STOP flag status.
same as done in commit 0df0a10 for cxd56xx
Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
This commit is contained in:
committed by
Xiang Xiao
parent
eeb4a0de83
commit
464c0831ce
@@ -590,6 +590,7 @@ static int rp23xx_i2c_transfer(struct i2c_master_s *dev,
|
|||||||
if (priv->error != OK)
|
if (priv->error != OK)
|
||||||
{
|
{
|
||||||
ret = priv->error;
|
ret = priv->error;
|
||||||
|
wostop = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -829,7 +830,8 @@ static void rp23xx_i2c_init(struct rp23xx_i2cdev_s *priv)
|
|||||||
i2c_reg_write(priv, RP23XX_I2C_IC_SDA_HOLD_OFFSET, 1);
|
i2c_reg_write(priv, RP23XX_I2C_IC_SDA_HOLD_OFFSET, 1);
|
||||||
|
|
||||||
i2c_reg_write(priv, RP23XX_I2C_IC_CON_OFFSET,
|
i2c_reg_write(priv, RP23XX_I2C_IC_CON_OFFSET,
|
||||||
(RP23XX_I2C_IC_CON_IC_SLAVE_DISABLE |
|
(RP23XX_I2C_IC_CON_IC_RESTART_EN |
|
||||||
|
RP23XX_I2C_IC_CON_IC_SLAVE_DISABLE |
|
||||||
RP23XX_I2C_IC_CON_MASTER_MODE |
|
RP23XX_I2C_IC_CON_MASTER_MODE |
|
||||||
RP23XX_I2C_IC_CON_TX_EMPTY_CTRL));
|
RP23XX_I2C_IC_CON_TX_EMPTY_CTRL));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user