Receive Data from GPIO with DMA

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Receive Data from GPIO with DMA

跳至解决方案
586 次查看
12914A
Contributor III

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 项奖励
回复
1 解答
513 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @12914A,

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 项奖励
回复
3 回复数
561 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @12914A,

 

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 项奖励
回复
516 次查看
12914A
Contributor III

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 项奖励
回复
514 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @12914A,

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 项奖励
回复