cancel
Showing results for 
Search instead for 
Did you mean: 

I2C Slave endless clock streching

RNaas
Associate

Hi,

I have the problem that I get an endless slave Clockstretching.

STM32F072 I2C configured with CubeMX, Primary slave adress $32

If I fire a Tx frame from a master with for example:

HAL_I2C_Master_Transmit(&hi2c1, 0x64, buf, 1, HAL_MAX_DELAY);

The clock is hold down by the slave and never released. The address matches, for the I2C ISR register I can see the reception address and the Busy and ADDR register set.

0693W000008Fz3wQAC.jpgIf I send for example:

HAL_I2C_Master_Transmit(&hi2c1, 0x66, buf, 1, HAL_MAX_DELAY);

I can see that the 9th clock comes and there is no acknowledge.

Activation of "Clock No Stretch Mode" solves my problem but I want to use the slave strech mode AND I do not understand why the slave does not ACK the frame and leaves the clock.

1 REPLY 1
MM..1
Chief III

Hmm i mean Master control clock line, when you have checked that Slave hold it down, its crazy strange.