I2C Module not working on KL25Z

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

I2C Module not working on KL25Z

ソリューションへジャンプ
4,560件の閲覧回数
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 件の賞賛
返信
1 解決策
4,375件の閲覧回数
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 件の賞賛
返信
2 返答(返信)
4,376件の閲覧回数
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 件の賞賛
返信
4,375件の閲覧回数
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 件の賞賛
返信