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
解決済! 解決策の投稿を見る。
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
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
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
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