I am using TWR-K60D100M-KIT and ran its accelerometer example for I2C. It ran succesffully. Modifying this example for neccessary chnages to establish I2C communication with GPIO expander PCA9698, I am facing a problem. The line of code which generates Start bit in accelerometer example is not generating satrt condition in my GPIO expander case (saw using oscilloscope). The values of I2C related registers just before the line of code generating start condition in both cases (on my pcb and TWR-K60D100M-KIT) are exactly same. So what would be the possible cause of start condition not being generated. SCL and SDA lines of I2C are pulled by 1.5k resistor value (voltage is 3.3V) in my pcb. Address of PCA9698 is 0x40 and I am trying to turn led on/off attached to bank 0, pin 0. Code is attached. Start-condition-code at line 686 of "fsl_i2c.c". 2783.I2C code for review.zip
After so many hours of hard labour, I finally came to the realization that I was not initiating the pin configuration properly to use I2C functionality of PORTE (pin 0 and 1). I2C_1 is ALT6 of PORTE (pin 0 and 1) which I was overlooking in pin_mux.c file