cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7A3 I2C_CR1 bit NOSTRETCH settings

NRAML.1
Associate II

Currently try to configurate settings for register I2C_CRI.

Not sure which value should I set for bit NOSTRETCH. I am using I2C as master.

This bit only effected when using I2C as slave. But in manual mention must kept cleared in master mode. 

Meaning that if I2C use as master mode need to set 0. Which seems like "clock stretching is enable"....

Please advise. should I set 0 or 1 in my case. I cannot understand the explanation.

----------explanation from STM32h7 reference manual-----------------------

Bit 17 NOSTRETCH: Clock stretching disable

・This bit is used to disable clock stretching in slave mode. It must be kept cleared in master mode.

・0: Clock stretching enabled

・1: Clock stretching disabled

Note: This bit can only be programmed when the I2C is disabled (PE = 0).

-----------------------------end-------------------------------------------------------------

2 REPLIES 2
TDK
Guru

> It must be kept cleared in master mode.

You're in master mode, so keep it cleared. Don't overthink it.

If you feel a post has answered your question, please click "Accept as Solution".
AScha.3
Principal III

It must be kept cleared in master mode.

Just do it, as manual prescribes.

If you feel a post has answered your question, please click "Accept as Solution".