S32K3 FlexIO I2C issues

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K3 FlexIO I2C issues

2,322件の閲覧回数
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.pngiverson3ya_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.pngiverson3ya_1-1716792786538.png

 

 

0 件の賞賛
返信
3 返答(返信)

2,305件の閲覧回数
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 件の賞賛
返信

2,297件の閲覧回数
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,277件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Thanks for the update @iverson3ya,

A single peripheral instance should be handled by one task.

 

BR, Daniel

0 件の賞賛
返信