Hi,

You could go using the XMCLib (check the examples provided in the XMCLib for using these functions)

XMC_I2C_CH_Init();
// Configure input pins
// Configure interrupts / events
...