Skip to main content
Visitor II
February 15, 2024
Solved

STM32H7A3 I2C_CR1 bit NOSTRETCH settings

  • February 15, 2024
  • 2 replies
  • 2261 views

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-------------------------------------------------------------

    This topic has been closed for replies.
    Best answer by AScha.3

    It must be kept cleared in master mode.

    Just do it, as manual prescribes.

    2 replies

    Super User
    February 15, 2024

    > It must be kept cleared in master mode.

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

    AScha.3Answer
    Super User
    February 15, 2024

    It must be kept cleared in master mode.

    Just do it, as manual prescribes.