flexio i2c communication issue

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

flexio i2c communication issue

Jump to solution
1,665 Views
DavidShu
Contributor II

MCU: S32K144
SDK: RTM3.0.0
project software environment: bare-metal
Questions:
We use both lpi2c and flexio_i2c in one system to communication different devices, but there may be some mistakes for flexio_i2c. We do some investcation for this issue, the result is flexio i2c communication is less robust than lpi2c.
So several test cases is made to find what make flexio so disturb sensitivity.
Case1:
Use flexio_i2c to communication with EEPROM, set the priority of FLEXIO_IRQn to 2, lower than Lpurat1,2 and system tick timer, and equel to flexcan.
we write data to EEPROM other read them to verify wether write process succeed. Totally test 35000, but 120 failed.
when we add log in flexio isr(FLEXIO_I2C_DRV_MasterCheckStatus()), it turned out both tx_shifter and rx_shifter error occurs when EEPROM write failed.

Case2:
Set the priority of FLEXIO_IRQn to highest in whole system, then do the some test above, Totally test 10000, only failed once.

Case3:
Use ipi2c do the same thing as case1, and set the priority of lpi2c master irq to 4(the lowest of whole software system), Totally test 6000, failed None!

It is too late to do any hardware changes at this moment for the project, so could you give some adivce for this issue.

0 Kudos
1 Solution
1,490 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello David,

There are some differences between these modules, for example, LPI2C has Tx/Rx FIFOs.
A possible solution could be to use DMA.

Best regards,

Diana

View solution in original post

0 Kudos
4 Replies
1,490 Views
DavidShu
Contributor II

@Diana Batrlova,Dear expert, could you kindly give some suggestions ?

0 Kudos
1,491 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello David,

There are some differences between these modules, for example, LPI2C has Tx/Rx FIFOs.
A possible solution could be to use DMA.

Best regards,

Diana

0 Kudos
1,490 Views
DavidShu
Contributor II

Hello Diana,

It works, after config flexio_i2c dirver type to DMA, it passed stress test for more than 20K timers withoud failed once.

So, another question comes, if not using DMA, flexio i2c, uart, spi have the some potential risk when communication, have the flexio in next generation NXP Micro-controller fixed this issue? 

0 Kudos
1,490 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi David,

At first, I'm very sorry for the delay.
Actually, this is not an issue. There are differences between the modules (as mentioned above), however, all these modules are described in the RM, so, it should be possible to consider the advantages or disadvantages of these modules related to the application requirements.

Best regards,

Diana

0 Kudos