Receive Data from GPIO with DMA

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

Receive Data from GPIO with DMA

Jump to solution
588 Views
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 Kudos
Reply
1 Solution
515 Views
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

View solution in original post

0 Kudos
Reply
3 Replies
563 Views
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 Kudos
Reply
518 Views
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 Kudos
Reply
516 Views
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 Kudos
Reply