S32K3 FlexIO I2C issues

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

S32K3 FlexIO I2C issues

2,398 Views
iverson3ya
Contributor III

I currently have two issues with I2C FlexIO:

1. The timing does not match the standard I2C specifications, particularly not meeting the tHD;DAT and tSU;DAT requirements. Is it possible to adjust this?

iverson3ya_0-1716792589008.png

2. When using FlexIO's I2c_AsyncTransmit, it gets stuck in an interrupt and doesn't exit. This doesn't happen the first time but occurs after polling a few times, and then it continuously triggers the interrupt without exiting.

iverson3ya_1-1716792786538.png

 

 

0 Kudos
Reply
3 Replies

2,381 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @iverson3ya,

The FlexIO just emulates the I2C protocol, there are some limitations.

The tHD;DAT and tSU;DAT parameters cannot be adjusted.

 

AN5133 Emulating I2C Bus Master by using FlexIO

https://www.nxp.com/docs/en/application-note/AN5133.pdf

AN12174 Using FlexIO to emulate communications and timing peripherals

https://www.nxp.com/docs/en/application-note/AN12174.pdf

 

What version of the RTD drivers do you use?

Does the address get acknowledged? Is the Slave device holding the bus low when the issue occurs?

What is the baudrate, and have you tried using lower baudrates?

 

Regards,

Daniel

0 Kudos
Reply

2,373 Views
iverson3ya
Contributor III

Perhaps because I'm using FreeRTOS, two tasks are entering I2c_AsyncTransmit simultaneously, causing an infinite loop. I added a critical section around I2c_AsyncTransmit and increased the interval between uses. So far, it hasn't happened again.

 

Could this be the cause?

 

thanks

2,353 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Thanks for the update @iverson3ya,

A single peripheral instance should be handled by one task.

 

BR, Daniel

0 Kudos
Reply