jlaitine commented on code in PR #8303:
URL: https://github.com/apache/nuttx/pull/8303#discussion_r1089062098
##########
arch/arm/src/stm32f7/stm32_i2c.c:
##########
@@ -784,11 +784,13 @@ static uint32_t stm32_i2c_toticks(int msgc, struct
i2c_msg_s *msgs)
bytecount += msgs[i].length;
}
- /* Then return a number of microseconds based on a user provided scaling
- * factor.
+ /* Then return a number of ticks based on a user provided scaling
+ * factor, rounded up.
*/
- return USEC2TICK(CONFIG_STM32F7_I2C_DYNTIMEO_USECPERBYTE * bytecount);
+ return USEC2TICK(CONFIG_STM32F7_I2C_DYNTIMEO_USECPERBYTE * bytecount +
Review Comment:
Yes, this is a wider problem. Only thing is, that I cannot test those other
platforms and I don't want to touch low level driver without testing them.
I don't know how this broke in the first place, the i2c used to work fine
previously, and now with the latest nuttx it didn't work pretty much at all
(all smaller i2c transfers have broken). So what happened here? Has someone
pushed in some untested change to i2c drivers?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]