Improved clock initialization logic

especially when STM32_I2C_LOOSE_CLK is defined