The ST32 communicate with the component PCA9633 (it is a LED driver)
I have my code very simplified to find the root cause: void I2CInit(void) { RCC->APB1ENR |= 0x00400000; // Pheripherie Clk für I2C1 RCC->APB2ENR |= 0x00000008; // Pheripherie Clock für PortB freischalten
I2C2->CR1 |= 0x8000; // SWRST
I2C2->CR1 &= ~0x8000; // SWRST
I2C2->CR1 |= 0x0001; // I/O Pins für I2C einschalten (PE)
I have some proposal : - Are you sure that GPIO are correctly configured ( AF Open drain). - When communication crashs, check if flag errors(ARLO,OVR,AF,BERR) are set or no. - Change delay by waiting until TXE flag is set ( after sending one byte wait until TXE flag is equal to 1 after that send the next byte). I have some recommendation while using I2C IP : you should after each operation check if related flag are set or no to correctly manage the communication. Good Bye.