Hi,
I am trying to get the I2C (channel 3) working in master mode on an iMXRT1062. I have used the interrupt example (evkmimxrt1060_lpi2c_interrupt) as a starting point and the port appears to initialise OK. When I try to start it with LPI2C_MasterStart() It seems to start off OK but the clocking goes awry after the first rising edge and seems to be forced back to zero and never finishes. The interface is held busy so I cannot write anything further. Master start is used with the following parameters.
LPI2C_MasterStart(I2C3_BASE, address, kLPI2C_Write);
where address = 0x48 (slave is LM75 at address 0)
I am using 100kHz baudrate (10us period) and 10MHz I2C clock source (see attached setup screenshot)
The attached output.jpg file shows the output on an oscilloscope. The top trace is data and the bottom trace is clock. The data appears to start OK with the start bit, followed by 0 then 1 as expected but then gets interrupted as the clock goes obviously wrong.
I'm using MCUexpresso and set up the interface using the peripheral/ clock tools with no errors or warnings.
Any help appreciated. I'm sure it's a setup problem but having fiddled with everything I can think of I am stumped.
Cheers AndyPeeps
Solved! Go to Solution.
Hello
Unfortunately, I wasn´t able to use the same pins as you since they are not available in the EVK, but the issue was similar to the other pins available for LPI2C3.
I solved this issue by changing the pin configuration in config tools. The module settings were in the same state as the SDK example.
I attached the pin configuration used.
If you have more questions do not hesitate to ask me.
Best regards,
Omar
Hi Omar,
Thanks for the response. Yes I am using the config tools to configure everything, including the pins. My pinout is (obviously) different from the EVK, so that could be it, yes. I have attached a screenshot of the pins tool configuration for the I2C I'm using, let me know if you see any problems with it.
Many thanks Andy
Hello
Unfortunately, I wasn´t able to use the same pins as you since they are not available in the EVK, but the issue was similar to the other pins available for LPI2C3.
I solved this issue by changing the pin configuration in config tools. The module settings were in the same state as the SDK example.
I attached the pin configuration used.
If you have more questions do not hesitate to ask me.
Best regards,
Omar
Ah yes thanks Omar, the key bit to change appears to be the 'Software Input ON' bit in the pins tool, which I had disabled.
I am not getting full 'words' out.
Many thanks Andy
Hello
Hope you are well. I replicated this issue with the EVK changing only the pin to use LPI2C3. I had a similar issue, I believe that this is caused by the pin configuration. Let me check in detail so we can find the root of the issue.
Were you using config tools to configure the LPI2C3 pins?
Best regards,
Omar