I'm working on a project with the MCU KL27Z.
I have a problem with the 9th bit on the I2C bus. The SDA line doesn't go all the way down (as ASK), it only goes half way down. I found that the solution should be making the SDA pin open drain, but i there´s no option to do that.
I´d like to know if there's a solution to this problem and how to do it.
You need to set the pins to open-drain in the pin's PORTx_PCRy register.
For I2C on the KL27 see:
and its appendix A for details of the double-buffered I2C controller in the KL27 and workarounds for its erratas.
Complete KL27 solutions, training and support: http://www.utasker.com/kinetis.html
For I2C line on PTC3 (for example) the register PORTx_PCRy is PORTC_PCR3 (address 0x4004b00c).
To save time just use the uTasker KL27 project since it does all for you and has I2C EEPROM support built into it, including simulation of the KL27, its I2C and the EEPROM. See also http://www.utasker.com/docs/uTasker/uTasker_I2C.pdf for I2C details and the workaround for the KL27 double-buffered I2C complications.