flexio iic probelm on S32 V2.0 IDE

cancel
Showing results for 
Search instead for 
Did you mean: 

flexio iic probelm on S32 V2.0 IDE

751 Views
建宽高
Contributor III

HI 

1 find EAR_0.8.4 library flexio IIC problem on S32 Design Studio for ARM V 2.0

pastedImage_1.png

When I tried to use flexio to write eeprom [AT24C02], I found that the sending device address was not responsive

I used the following API

/* Send data to the slave */
tmpStatus=FLEXIO_I2C_DRV_MasterSendDataBlocking(&i2cMasterState, masterBuffer, 5, true, OSIF_WAIT_FOREVER);

0 Kudos
7 Replies

133 Views
jiri_kral
NXP Employee
NXP Employee

Hello, 

do you have correctly wired the A0-A2 inputs on AT24C02 ? (for 0xA0 device address the A0-A2 pins should be connected to GND). 

You can set slave device address by FLEXIO_I2C_DRV_MasterSetSlaveAddr(...) API function - in case that you have different device address than 0xA0. 

Jiri

0 Kudos

133 Views
建宽高
Contributor III

The address set is right, the EEPROM address is A0, I use software to simulate IIC, same address test passes

0 Kudos

133 Views
jiri_kral
NXP Employee
NXP Employee

Well, if the address (and other stuff like power/wiring) is okay - the NACK state may be caused by damaged EEPROM - IC is not responding to device address command by pulling down ACK bit. Can you test different AT24C02? And second question - are you able read data from eeprom? 

Jiri 

0 Kudos

133 Views
建宽高
Contributor III

I tried the IIC device on the other address on the bus, which was also unresponsive.

Before colleagues in version 1.3 IDE, RTM1.0 interview library success, now migrate to version 2.0 of the IDE program, send API calls, is also no response, so I doubt is the problem of IIC hardware, I excluded some address error, timing error, and so on and so forth

Thank you for your reply

0 Kudos

133 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

I modified one of the I2C s32ds examples to your case - and  testing data are transferred correctly between Master <-> Slave. 

The master device is flexio_i2c and slave is lpi2 - both on one EVB and driven by interrupts. Project is in attachment. Slave device address is 1010000b (0x50), baud rate 500kHz. I'm using S32K144 EVB Q100, SDK v0.8.5 . 

For loopback test - connect by jumper wires pins:

MA           SLA

J1-2 <--> J1-3     CLK

J6-1 <--> J1-1     SDA

For direct connection with EEPROM - use master J1-2 (CLK) and J6-1 (SDA). You also need to replace testing data with real one. 

Jiri

0 Kudos

133 Views
建宽高
Contributor III

I do not install 0.8.5 library now, but only 0.8.4 library. If I upgrade directly, will I have any impact on the project with 0.8.4 library?What's the difference between these two libraries?

pastedImage_3.png

pastedImage_4.png

pastedImage_5.png

0 Kudos

133 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

The 0.8.4 remains in your installation without any change. You can go ahead and install 0.8.5 SDK version.Install newer version is better than migrate testing project into older one - as mentioned in screenshot - Such project might not work. 

Jiri

0 Kudos