Issue with I2C Code in S32K312

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Issue with I2C Code in S32K312

跳至解决方案
1,337 次查看
JIBIN_7
Contributor II

Hi
I am an faciing an issue with I2C code using DMA. I've attached the code below.
I am facing difficulties receiving the transmitted value in the receive buffer slave.
Upon probing with a CRO, we observed that the SCL clock is not reflecting.
Pins used

MicrosoftTeams-image (1).png


Additionally, we have debugged the lpuart_i2c code and flexio_i2c code available in the 2.0.1 package, but even with these, we aren't getting any SCL clock.
how can we resolve this?

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
968 次查看
JIBIN_7
Contributor II

its working after connecting 4k resistor externally.

thanks

 

在原帖中查看解决方案

标记 (1)
0 项奖励
回复
10 回复数
1,311 次查看
JIBIN_7
Contributor II

I have gone through the link you have shared above.They were also mentioning that they are facing hardware issue in S32K312.

I'm using s32k312 eval board,i see the same issue here.

if that so, how can i test i2c in s32k312 eval board?

0 项奖励
回复
1,275 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @JIBIN_7,

I apologize for the misunderstanding, does this issue happen with the S32K312 EVB when running the example?

0 项奖励
回复
1,230 次查看
JIBIN_7
Contributor II

We've been working with the S32K312EVB-Q172 EVB, using example codes including 'I2C HLD FLEXIO Transfer S32K312' and 'I2C IP LP12C Transfer S32K312'.

In our testing, we modified the slave SCL pin from PTD9 to PTC7 and SDA pin from PTD8 to PTC6.

Also ensured that pull-up resistors were enabled for each pin .

but we're still unable to obtain the SCL clock signal.

can you please guide us  how to proceed with?

标记 (1)
0 项奖励
回复
1,155 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @JIBIN_7,

Could you test the following example for S32K312? I've tested it and the data transfer seems to work fine:

Julin_AragnM_0-1711401619938.png

Example S32K312 I2C Transmit & Receive Using DMA DS3.5 RTD300 - NXP Community

Best regards,
Julián

0 项奖励
回复
1,130 次查看
JIBIN_7
Contributor II
Could you please mention which example code?
0 项奖励
回复
1,117 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @JIBIN_7,

I apologize, I have now added the link for the I2C example in my previous reply.

Best regards.

0 项奖励
回复
1,092 次查看
SandyHCL
Contributor I

@Julián_AragónM What is the pin connection or hardware connection we do in S32K312 Eval board? As of now I am connecting I2C0 pins to I2C1 pins. SCL (PTD14 to PTC7) and SDA (PTD13 to PTC6). As for this example I need to see data in the rxBufferSlave should be populated with the values same as the txBuffer but it is always showing zeros in the rxBufferSlave. Any inputs for this? Should we have to make any hardware changes like connecting a pull-up resistor additionally.

0 项奖励
回复
1,046 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @SandyHCL

The connections you mentioned are correct. LPI2C0 - LPI2C1:

  • [40] PTD14 lpi2c0_scl - [140] PTC7 - lpi2c1_scl
  • [41] PTD13 lpi2c0_sda - [141] PTC6 lpi2c1_sda

The rxBufferSlave should be populated with the values.

No additional hardware modifications are needed. If the example is still not working, please confirm the jumper configuration is the same as the Getting Started with the S32K312EVB-Q172 Evaluation Board for General Purpose

Best regards,
Julián

0 项奖励
回复
969 次查看
JIBIN_7
Contributor II

its working after connecting 4k resistor externally.

thanks

 

标记 (1)
0 项奖励
回复
1,317 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @JIBIN_7,

If the examples do not show presence for the SCL line, this may point to a hardware issue. You can look into the S32K3 Hardware Design Guidelines.

There is also a community post about a similar issue: Solved: S32k314 I2C - NXP Community

Best regards,
Julián

 

0 项奖励
回复