Strange I2C output

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
3,138件の閲覧回数
AndyPeeps
Contributor I

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

ラベル(1)
0 件の賞賛
返信
1 解決策
3,102件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

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.

Omar_Anguiano_0-1651710397816.png

I attached the pin configuration used.
If you have more questions do not hesitate to ask me.
Best regards,
Omar

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
3,110件の閲覧回数
AndyPeeps
Contributor I

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

0 件の賞賛
返信
3,103件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

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.

Omar_Anguiano_0-1651710397816.png

I attached the pin configuration used.
If you have more questions do not hesitate to ask me.
Best regards,
Omar

0 件の賞賛
返信
3,095件の閲覧回数
AndyPeeps
Contributor I

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

 

0 件の賞賛
返信
3,113件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信