Thanks. Well I did connect the RTC in the same way as I would connect an RTC to an Arduino. However, the codes are not working on the SAMD MCU. e.g. when i check the time on an Arduino Nano, the output time is shown correctly. However, the SAMD MCU shows garbage time. I'm trying to use RTCLib by Adafruit for DS3231.
Also, the MCU becomes very slow in its operation when i connect any I2C device to the ports regardless whether it is reading the I2C device or not.