I2C Module not working on KL25Z

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C Module not working on KL25Z

Jump to solution
851 Views
roccorondinella
Contributor II


Hi I'm doing a processor expert project on the KL25Z freedom board and the I2C stopped working as soon as I added more components. I tried changing it back to it's previous state to revert the problem but it persisted. I'm out of the ideas as how to fix it.

What I'm trying to do is to communicate with an external sensor that works with I2C with the address 0x23, but when I look with a logic analyzer nothing shows up in both the SCL and SDA, in fact not even the lines are pulled up, they are both in low state. I know the logic analyzer wont send an ACK but at least I want to see if the I2C module is sending the Start bit and Address code.

I'm attaching the whole PE configuration for this component, if any other detail is required please let me know.

0 Kudos
1 Solution
666 Views
roccorondinella
Contributor II

I finally found out what happened when I compared it with and example of KSDK, somehow in the Low Level PE Init the code skipped the pull-up part on those pins, keeping the channel always down. I still don't know why that happened.

Thanks for the answer anyway, have a great day to!
Rocco

View solution in original post

0 Kudos
2 Replies
667 Views
roccorondinella
Contributor II

I finally found out what happened when I compared it with and example of KSDK, somehow in the Low Level PE Init the code skipped the pull-up part on those pins, keeping the channel always down. I still don't know why that happened.

Thanks for the answer anyway, have a great day to!
Rocco

0 Kudos
666 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Rocco,

    Did you mean, before your add the other components, the I2C module in  KL25 PE project is working correctly?

    Which component you are adding?

    Did you try to create a new PE project just as before?

    Besides, the I2C module working is not only relate to the component configuration, but also relate to the code writing, about the code, you can refer to the KSDK1.3.0 code:

C:\Freescale\KSDK_1.3.0\examples\frdmkl25z\driver_examples\i2c

Wish it helps you!


Have a great day,
Jingjing

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos