Hello,
I'm trying to implement an I2C communication between a Kinetis K12 and a Kinetis KL16.
To sum up, it seems that the K12 does not see the signals coming from the KL16. Here is what makes me come to this conclusion:
The master send a frame, but the slave does not detect anything, there is not any interrupt.
This one is more interesting.
The master send a frame. This frame is detected by the slave (KL16), the IAAS bit is set, the first byte (slave address) is followed by a ACK (SDA LOW on the 9th bit).
But the master (K12) does not see the ACK: I get an interrupt after the address byte is transmitted, but the RXAK bit is set, meaning that the ACK from the slave has not been detected by the master.
Here, we can see the ACK from the slave, but the K12 can not.
There is a small glitch before the ACK.
Maybe the LOW level of the ACK to is too high to be detected. Though, it is ~1V, and from the K12 datasheet, input low voltage maximal value is 0.35*Vdd = ~1.15V.
So here are my questions:
- Do you think it is possible that the SDA LOW signal is too high to be detected ?
- Do you think the glitch before the ACK can affect the result ?
- May be I'm missing something else ?
Thank you for your help.
Solved! Go to Solution.
Hello Dilebo:
In the case of K12, you have to enable Open-Drain in the used pins (PORTx_PCRn[ODE] = 1).
With this the ACK bit should go low all the way.
Let us know your results.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Dilebo:
In the case of K12, you have to enable Open-Drain in the used pins (PORTx_PCRn[ODE] = 1).
With this the ACK bit should go low all the way.
Let us know your results.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Problem solved !
Thank you Jorge