summaryrefslogtreecommitdiffstatshomepage
path: root/py/objint_longlong.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-08-16 13:34:04 +1000
committerDamien George <damien.p.george@gmail.com>2019-08-16 13:34:04 +1000
commit3eff81288cb494c7d1a9fcf0a82d4e21bbd92dd8 (patch)
treeaf030ea191e19d8e226f40ebf70e0042b3fb7567 /py/objint_longlong.c
parenteb7eed5d920748f8222efbd16bfb24c3d1798e83 (diff)
downloadmicropython-3eff81288cb494c7d1a9fcf0a82d4e21bbd92dd8.tar.gz
micropython-3eff81288cb494c7d1a9fcf0a82d4e21bbd92dd8.zip
stm32/i2c: Fix generation of restart condition for hw I2C on F0/F7.
Before this patch I2C transactions using a hardware I2C peripheral on F0/F7 MCUs would not correctly generate the I2C restart condition, and instead would generate a stop followed by a start. This is because the CR2 AUTOEND bit was being set before CR2 START when the peripheral already had the I2C bus from a previous transaction that did not generate a stop. As a consequence all combined transactions, eg read-then-write for an I2C memory transfer, generated a stop condition after the first transaction and didn't generate a stop at the very end (but still released the bus). Some I2C devices require a repeated start to function correctly. This patch fixes this by making sure the CR2 AUTOEND bit is set after the start condition and slave address have been fully transferred out.
Diffstat (limited to 'py/objint_longlong.c')
0 files changed, 0 insertions, 0 deletions