Issue with I2C Code in S32K312

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

Issue with I2C Code in S32K312

Jump to solution
2,065 Views
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?

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
1,696 Views
JIBIN_7
Contributor II

its working after connecting 4k resistor externally.

thanks

 

View solution in original post

Tags (1)
0 Kudos
Reply
10 Replies
2,039 Views
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 Kudos
Reply
2,003 Views
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 Kudos
Reply
1,958 Views
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?

Tags (1)
0 Kudos
Reply
1,883 Views
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 Kudos
Reply
1,858 Views
JIBIN_7
Contributor II
Could you please mention which example code?
0 Kudos
Reply
1,845 Views
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 Kudos
Reply
1,820 Views
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 Kudos
Reply
1,774 Views
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 Kudos
Reply
1,697 Views
JIBIN_7
Contributor II

its working after connecting 4k resistor externally.

thanks

 

Tags (1)
0 Kudos
Reply
2,045 Views
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 Kudos
Reply