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.
Solved! Go to Solution.
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
@Diana Batrlova,Dear expert, could you kindly give some suggestions ?
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
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?
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