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
898 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
1 Solution
529 Views
JIBIN_7
Contributor II

its working after connecting 4k resistor externally.

thanks

 

View solution in original post

Tags (1)
0 Kudos
10 Replies
872 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
836 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
791 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
716 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
691 Views
JIBIN_7
Contributor II
Could you please mention which example code?
0 Kudos
678 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
653 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
607 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
530 Views
JIBIN_7
Contributor II

its working after connecting 4k resistor externally.

thanks

 

Tags (1)
0 Kudos
878 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