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