<p><b>@aabadie</b> requested changes on this pull request.</p>

<p>Looks good in general. Maybe <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=19396439" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/MrKevinWeiss">@MrKevinWeiss</a> could run this on its HIL setup to validate the I2C behaviour ?</p><hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/12101#discussion_r322100284">cpu/stm32_common/periph/i2c_2.c</a>:</p>
<pre style='color:#555'>> @@ -186,23 +186,34 @@ int i2c_acquire(i2c_t dev)
     mutex_lock(&locks[dev]);
 
 #ifdef STM32_PM_STOP
-    /* block STOP mode */
</pre>
<p>Unrelated</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/12101#discussion_r322100347">cpu/stm32_common/periph/i2c_2.c</a>:</p>
<pre style='color:#555'>>      periph_clk_dis(i2c_config[dev].bus, i2c_config[dev].rcc_mask);
 
 #ifdef STM32_PM_STOP
-    /* unblock STOP mode */
</pre>
<p>Unrelated change</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/12101#discussion_r322100553">cpu/stm32_common/periph/i2c_2.c</a>:</p>
<pre style='color:#555'>>      return 0;
 }
 
 int i2c_release(i2c_t dev)
 {
     assert(dev < I2C_NUMOF);
 
+    I2C_TypeDef *i2c = i2c_config[dev].dev;
</pre>
⬇️ Suggested change
<pre style="color: #555">-    I2C_TypeDef *i2c = i2c_config[dev].dev;
+    /* disable device */
+    i2c_config[dev].dev->CR1 &= ~(I2C_CR1_PE);
</pre>


<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/12101#discussion_r322100896">cpu/stm32_common/periph/i2c_1.c</a>:</p>
<pre style='color:#555'>>      return 0;
 }
 
 int i2c_release(i2c_t dev)
 {
     assert(dev < I2C_NUMOF);
 
+    I2C_TypeDef *i2c = i2c_config[dev].dev;
</pre>
⬇️ Suggested change
<pre style="color: #555">-    I2C_TypeDef *i2c = i2c_config[dev].dev;
+    /* disable device */
+    i2c_config[dev].dev->CR1 &= ~(I2C_CR1_PE);
</pre>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/12101?email_source=notifications&email_token=ABE7WYF5XQR4C4T7R5ZKUNDQIX4ZFA5CNFSM4IQHBK62YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCEA3MVA#pullrequestreview-285324884">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYBRJI6J34WECIUUAGLQIX4ZFANCNFSM4IQHBK6Q">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYFJ7RLUKPUTVWBL4BLQIX4ZFA5CNFSM4IQHBK62YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCEA3MVA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/12101?email_source=notifications\u0026email_token=ABE7WYF5XQR4C4T7R5ZKUNDQIX4ZFA5CNFSM4IQHBK62YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCEA3MVA#pullrequestreview-285324884",
"url": "https://github.com/RIOT-OS/RIOT/pull/12101?email_source=notifications\u0026email_token=ABE7WYF5XQR4C4T7R5ZKUNDQIX4ZFA5CNFSM4IQHBK62YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCEA3MVA#pullrequestreview-285324884",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>