How to use S32K148 IIC Read an external EEPROM

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

How to use S32K148 IIC Read an external EEPROM

Jump to solution
909 Views
Kevin-Roman
Contributor II

Hi everyone. 

     I have a question,When I'm debugging S32K148 IIC read an external EEPROM.The following problems occur:

    

KevinRoman_1-1646016720059.png      It's going to get stuck at this point,Please see the engineer help me I want to know why

Thanks

WangXiao

 

 

 

Tags (1)
0 Kudos
1 Solution
892 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

so does it mean the RXEMPTY bit is never cleared?
Do you see any bytes (clocks/data) on the bus for this read sequence?
Also I guess you should change condition for while loop, this way shifting temp you can lost data value.
You can have e.g.

for(i=0;i<len;i++)
{
   do
   {
       temp = LPI2C0->MRDR;
       wdtIntFeed();
   } while(0U != (temp&0x4000U));
   data[i] = temp;
}

BR, Petr

View solution in original post

0 Kudos
2 Replies
893 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

so does it mean the RXEMPTY bit is never cleared?
Do you see any bytes (clocks/data) on the bus for this read sequence?
Also I guess you should change condition for while loop, this way shifting temp you can lost data value.
You can have e.g.

for(i=0;i<len;i++)
{
   do
   {
       temp = LPI2C0->MRDR;
       wdtIntFeed();
   } while(0U != (temp&0x4000U));
   data[i] = temp;
}

BR, Petr

0 Kudos
847 Views
Kevin-Roman
Contributor II

Very grateful to youThe problem has been solved.

0 Kudos