S32k324 I2C question

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

S32k324 I2C question

562 Views
bubububu
Contributor II

Burn the program of S32k324 into the board of S32k344, initialize I2C, set MCR ->MEN to 1, the data read by MSR ->BBF is 1, and the I2C bus is busy. What is this asking

Tags (1)
0 Kudos
Reply
7 Replies

550 Views
danielmartynek
NXP TechSupport
NXP TechSupport

HI @bubububu,

If either SCL or SDA are low, the I2C bus is no longer considered idle.

Do you use pull-up resistors at the SCL, SDA lines?

Can you monitor the bus with an oscilloscope?

 

Thank you,

BR, Daniel

0 Kudos
Reply

545 Views
bubububu
Contributor II

after initialize I2C,Logic analyzer measurement SCL and SDA are high, 

SCL uses PTC7 pin

SDA uses PTC6 pin

 SCL, SDA lines have  pull-up resistorsimg_v3_02ij_72d3e22e-090d-40ec-b11e-98c5ed01d5ag.jpgimg_v3_02ij_9501869c-3a21-49a8-989d-f4d088a6716g.jpg

0 Kudos
Reply

529 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Are the ports correctly muxed to the LPI2C1 module in MSCRx?

danielmartynek_0-1737020915573.png

 

0 Kudos
Reply

514 Views
bubububu
Contributor II

It is configured according to the diagram aboveimg_v3_02ij_6cf92420-ea56-477d-8c01-ee7657a0925g.jpgimg_v3_02ij_8695aeae-d24a-4d90-a6b3-845678cdacdg.jpg

0 Kudos
Reply

508 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Please check the MSCR registers in the register view.

Do you use SDK / RTD or your own code?

Can you share the project or the function you use the initialize the module?

Double-check the clock configuration, it should be set precisely to one of the clock options listed in the RM, e.g. Option A, Table 151. Option A - High Performance mode (CORE_CLK @ 160 MHz).

 

Regards,

Daniel

 

0 Kudos
Reply

494 Views
bubububu
Contributor II

Please check the MSCR registers in the register view.

->After the initialization of i2c, MS/CR register state,MSR->BBF bit is 1

bubububu_0-1737078862370.jpeg

Do you use SDK / RTD or your own code?

->Downloaded online through s32ds.exe application

Can you share the project or the function you use the initialize the module?

->Initialize i2c using Lpi2 c_IpMasterInit (1,&I2c_Lpi2 cMasterChannel1)function

The i2c clock configuration is as follows

bubububu_1-1737079226278.jpegbubububu_2-1737079234315.jpeg

bubububu_3-1737079246198.jpeg

 

0 Kudos
Reply

471 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @bubububu,

I mean the MSCR registers of the two ports in the SIUL2 module.

SIUL_MSCR70 and SIUL_MSCR71.

What RTD version is it? You can find in at the top of any RTD cource file.

It would be better if you could share the project here or via a support ticket.

 

Regards,

Daniel

 

0 Kudos
Reply