forked from nuttx/nuttx-update
stm32_i2c: fix sending large data over i2c
To trigger TC interrupt NBYTES needs to be set before RELOAD is disabled
similar to previous commitdone on stm32h7 510b6221ca
This commit is contained in:
parent
919cb73913
commit
a7869bb28b
5 changed files with 10 additions and 10 deletions
|
@ -1984,9 +1984,9 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
|
||||||
i2cinfo("TCR: DISABLE RELOAD: NBYTES = dcnt = %i msgc = %i\n",
|
i2cinfo("TCR: DISABLE RELOAD: NBYTES = dcnt = %i msgc = %i\n",
|
||||||
priv->dcnt, priv->msgc);
|
priv->dcnt, priv->msgc);
|
||||||
|
|
||||||
stm32_i2c_disable_reload(priv);
|
|
||||||
|
|
||||||
stm32_i2c_set_bytes_to_transfer(priv, priv->dcnt);
|
stm32_i2c_set_bytes_to_transfer(priv, priv->dcnt);
|
||||||
|
|
||||||
|
stm32_i2c_disable_reload(priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
i2cinfo("TCR: EXIT dcnt = %i msgc = %i status 0x%08" PRIx32 "\n",
|
i2cinfo("TCR: EXIT dcnt = %i msgc = %i status 0x%08" PRIx32 "\n",
|
||||||
|
|
|
@ -1984,9 +1984,9 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
|
||||||
i2cinfo("TCR: DISABLE RELOAD: NBYTES = dcnt = %i msgc = %i\n",
|
i2cinfo("TCR: DISABLE RELOAD: NBYTES = dcnt = %i msgc = %i\n",
|
||||||
priv->dcnt, priv->msgc);
|
priv->dcnt, priv->msgc);
|
||||||
|
|
||||||
stm32_i2c_disable_reload(priv);
|
|
||||||
|
|
||||||
stm32_i2c_set_bytes_to_transfer(priv, priv->dcnt);
|
stm32_i2c_set_bytes_to_transfer(priv, priv->dcnt);
|
||||||
|
|
||||||
|
stm32_i2c_disable_reload(priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
i2cinfo("TCR: EXIT dcnt = %i msgc = %i status 0x%08" PRIx32 "\n",
|
i2cinfo("TCR: EXIT dcnt = %i msgc = %i status 0x%08" PRIx32 "\n",
|
||||||
|
|
|
@ -2018,9 +2018,9 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
|
||||||
i2cinfo("TCR: DISABLE RELOAD: NBYTES = dcnt = %i msgc = %i\n",
|
i2cinfo("TCR: DISABLE RELOAD: NBYTES = dcnt = %i msgc = %i\n",
|
||||||
priv->dcnt, priv->msgc);
|
priv->dcnt, priv->msgc);
|
||||||
|
|
||||||
stm32_i2c_disable_reload(priv);
|
|
||||||
|
|
||||||
stm32_i2c_set_bytes_to_transfer(priv, priv->dcnt);
|
stm32_i2c_set_bytes_to_transfer(priv, priv->dcnt);
|
||||||
|
|
||||||
|
stm32_i2c_disable_reload(priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
i2cinfo("TCR: EXIT dcnt = %i msgc = %i status 0x%08" PRIx32 "\n",
|
i2cinfo("TCR: EXIT dcnt = %i msgc = %i status 0x%08" PRIx32 "\n",
|
||||||
|
|
|
@ -2176,9 +2176,9 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
|
||||||
* the transfer.
|
* the transfer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
stm32_i2c_enable_reload(priv);
|
|
||||||
|
|
||||||
stm32_i2c_set_bytes_to_transfer(priv, 255);
|
stm32_i2c_set_bytes_to_transfer(priv, 255);
|
||||||
|
|
||||||
|
stm32_i2c_enable_reload(priv);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -2223,9 +2223,9 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
|
||||||
i2cinfo("TCR: DISABLE RELOAD: NBYTES = dcnt = %i msgc = %i\n",
|
i2cinfo("TCR: DISABLE RELOAD: NBYTES = dcnt = %i msgc = %i\n",
|
||||||
priv->dcnt, priv->msgc);
|
priv->dcnt, priv->msgc);
|
||||||
|
|
||||||
stm32_i2c_disable_reload(priv);
|
|
||||||
|
|
||||||
stm32_i2c_set_bytes_to_transfer(priv, priv->dcnt);
|
stm32_i2c_set_bytes_to_transfer(priv, priv->dcnt);
|
||||||
|
|
||||||
|
stm32_i2c_disable_reload(priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
i2cinfo("TCR: EXIT dcnt = %i msgc = %i status 0x%08" PRIx32 "\n",
|
i2cinfo("TCR: EXIT dcnt = %i msgc = %i status 0x%08" PRIx32 "\n",
|
||||||
|
|
Loading…
Reference in a new issue