Receive Data from GPIO with DMA

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

Receive Data from GPIO with DMA

126件の閲覧回数
Sandra1
Contributor II

Hi,

I'm using an S32k142.

We're emulating an I2C signal over GPIO (PTB0, PTB1) because we have only one I2C on this MC but need two. This is already working.

But we need also to read the i2c communication, which is written between another MC and a LED-Driver.

So my question is, if there's any example for reading a GPIO Pin with DMA without SDK.

Thx for your help.

#S32k

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

101件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Sandra1,

 

There is just AN5258 Using DMA for Pulse Counting on S32K that utilizes DMA on the PORTs.

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

 

S32K142 has FlexIO that can emulate I2C.

AN12174 Using FlexIO to emulate communications and timing peripherals

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

 

Regards,

Daniel

 

0 件の賞賛

56件の閲覧回数
Sandra1
Contributor II

Hi Daniel,

thx for your answer.
I've configured the SCL Pin as DMA request on falling edge. The DMA should read the level of SDA Pin.

The falling edge occurs round about every 9µs. Could it be, that the DMA is not fast enough for this?

Because the data we're reading from SDA Pin is not correct.

Regards,

Sandra

0 件の賞賛

53件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Sandra1,

How inaccurate is it? What do you send at SDA and what do you see in the DMA destination buffer? Is it shifted?

The DMA reads the ports via the crossbar switch, have you tested it with the round-robin arbitration?

Do you use other DMA channels for other purposes?

Can you increase the system clock frequency?

 

Regards,

Daniel

0 件の賞賛