connectting J-link debugger has influence on I2C communication.
I2C function always stucks at waiting for BTF flag if connectting STM32 with J-LINK debugger to start running program, however, the I2C can send command to slave device well when powered on without debuger control. I just call HAL_I2C_Master_Transmit_DMA to send two bytes command to slave device at main() function, the I2C will stuck when I click “run(F5)�? of keil without any breakpoint but it can send command successfully after powered off and on, and I'm using F429 MCU .
when start runing program in keil, SCL become low after calling HAL_I2C_Master_Transmit_DMA , I2C will stuck here:
when powered on, SCL & SDA all become high after calling HAL_I2C_Master_Transmit_DMA, it's normal :