I have a custom board using a SAMD20. I have two USART ports and two I2C ports. Both USARTs work fine. The I2C ports are on SERCOM 2 and 4. Neither of them work.
The I2C ports are operating in Slave mode and configured with 1MHz core clock and 32KHz slow clock. By sampling the respective PAxx pins in FW I have confirmed that I2C input pins are toggling whenever I2C data is present on the I2C bus. We are using a level converter to convert 3.2Volts I2C signal to 1.8 volts I2C signal which is then fed to SAMD20.
I have used the Atmel Start project to configure the project. I have tried using Async and sync modes. But I still can't get I2C to work.
Any pointers on what I could be doing wrong or on how I should proceed to debug this issue?