i.mxRT1021 I2C slave address

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

i.mxRT1021 I2C slave address

Jump to solution
3,062 Views
santosh1
Contributor III

Hello, 

I have a custom i.MXRT1021 based board with an EEPROM connected to I2C. I would appreciate any pointers to an issue i am running into. 

The I2C module generates a start condition, but it does not generate any slave address, after the start the SDA line is being held high, while clock is being generated. There is only one device on the I2C bus.  

I have attached the captured waveform - the SDA line is pulled down for start as expected - but after that the line stays high. 

I2C command used is 0x0400, direction is read. Writing to MTDR generates start as expected, but nothing after that.

would appreciate any pointers, 

 

Labels (3)
0 Kudos
Reply
1 Solution
3,050 Views
mjbcswitzerland
Specialist V

Hi

Check the configuration of the LPI2C pins and verify that they have the SION flag being set - if not the internal clocking will not work and strange things happen.

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1020.html

View solution in original post

4 Replies
3,051 Views
mjbcswitzerland
Specialist V

Hi

Check the configuration of the LPI2C pins and verify that they have the SION flag being set - if not the internal clocking will not work and strange things happen.

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1020.html

2,869 Views
FirmFruits
Contributor II

If you use CubeMX or CubeIDE, set "Software Input On" to Enable.

 

like a below image.

FirmFruits_0-1628819198958.png

 

3,044 Views
santosh1
Contributor III

Thanks for the pointers. SION flag not being set was the primary problem - there probably might be a secondary issue with SDK 2.7.1 vs SDK 2.9 on overall I2C processing using SDK API - but i have not root caused it thought. 

0 Kudos
Reply
3,057 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi santosh1

  From your I2C bys, seems your code didn't sendout the data.

 Do you check the official SDK code?

 You can refer to this code:

SDK_2.9.0_EVK-MIMXRT1020\boards\evkmimxrt1020\demo_apps\ecompass

This code is also using the external I2C chip,  that code also contains the slave address, you even can test that code I2C bus, whether that can sendout the slave address or not. If the official SDK code can send out the slave address, I think you need to check your code.

 

Best Regards,

Kerry

0 Kudos
Reply