Flexio I2C error in transfers - MIMXRT1060-EVK

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

Flexio I2C error in transfers - MIMXRT1060-EVK

1,509 Views
thomassteenbrug
Contributor I

I cant get the fsl_flexio_master driver from the SDK file for the MIMXRT1060-EVK to work. After some testing with an oscilloscope I noticed that the start signal and the first bit of the 7 bit address interfere with each other. This causses the slave to NACK since it doesnt see a start nor does it see the right address. 

In the picture below you can see an example of this. Bitwise it schould read 1101 000 (0 for write), but it shows that the first bit isnt send correctly. Likewise there is no start signal recorded so the decoder of the oscilloscope cant decode the message. Is there a way to resolve this issue? Ive looked into the FLEXIO_I2C_MasterInit but can't work out what shifter or timer settings to change to resolve the issue. IMG_20181217_172534.jpg

0 Kudos
4 Replies

1,250 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Thomas Steenbruggen,

   What the slave you are using?

   Do you try to the RT1060 SDK i2c slave and master in two boards? Then whether the I2C works OK on your side or not?

  This master and slave project in compare has been tested, so it should works.

   If two official board, one is I2C master, another one is I2C slave, this hardware works, then your problem may also relate to your own I2C slave.

  Please try two official board on your side.

If you still have question about it, please kindly let me know.
Have a great day,
Kerry

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

0 Kudos

1,250 Views
thomassteenbrug
Contributor I

Hi Kerry,

Im using the MIMXRT1060-EVK development board. With this I was running the SDK examples for the RT1060. After running the example project evkmimxrt1060_flexio_i2c_interrupt_lpi2c_transfer I ran into the problem I described in my first post. The example projects for LPI2C is working with the slave I'm using, so the problem is not the slave. I've also tried it with the RT1050 and the SDK examples for the RT1050 and here the LPI2C and the Flexio I2C are both working, with the same slave aswell. This leads me to think that there is a problem with the SDK library for the RT1060.

The same issue occurs with the SDK example fatfs_usdcard for the RT1060. This example doesn't work on the RT1060, it gets stuck at creating the file system and never gets out of this. This example also does work on the RT1050 when using the RT1050 SDK files. This is an example that, out of the box, should work with the development boards and a SD card. Since this is not the case I'm convinced that there is again a problem with the SDK files for the RT1060.

I hope someone can resolve these issues so I can continue with my current project for the RT1060. 

Kind regards,

 

0 Kudos

1,250 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi thomas,

    About your second question, fatfs_sdcard for RT1060, I have tested two difference SD cards, both works OK.

   Please check my test result:

 This is the printf log:

pastedImage_1.png

pastedImage_2.png

This is the SD card result:

pastedImage_3.png

Before you insert your sd card to the board, please format it as fat32.

These are the two sd cards which I am using:

pastedImage_4.png

I think you can try another SD card.


Have a great day,
Kerry

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

0 Kudos

1,250 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi thomas Steenbruggen,

    When you run the evkmimxrt1060_flexio_i2c_interrupt_lpi2c_transfer code, do you do this connection:

To make this example work, connections needed to be as follows:

    FLEXIO_I2C        connected to  LPI2C1
SCL     SW5-2           -->        J23-6
SDA     SW5-1           -->        J23-5

This is very important.

I have tested it on my side after connect the two I2C, SW5_1 OFF, SW5_2 OFF, then connect to J23_5 and J23_6.

This is my test result:

pastedImage_1.png

Please check it again on your side.


Have a great day,
Kerry

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

0 Kudos