I2C repeated start with TC377

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
samcs
Level 1
Level 1
5 likes given 10 questions asked 25 sign-ins

Hi , 

I am using  Ifx_Tc3xx_I2c package, the CPU is TC377, the I2C device needs a Read format as follows:

S,Slave Addr+0,Ack(slave), Regisger address, Ack, ReStart, Slave Addr+1, Data1,Ack, Data2,Ack,...,

In I2c.c in the folder, there are I2c_AyncWrite(), I2c_SyncWrite(), I2c_AyncRead(), I2c_SyncRead() APIs.

Could anyone show me how to generate the repeated start or provide the sample code.

Thanks

0 Likes
1 Solution
Nambi
Moderator
Moderator
Moderator
50 likes received 5 likes given 100 solutions authored
0 Likes
6 Replies
Wangbk
Level 3
Level 3
25 sign-ins 10 replies posted First question asked

Is the waveform you want like the one shown in the picture below? There is no stop condition.

20230914173439.png

The following code may be helpful to you:
 
I2C0_ADDRCFG.B.SOPE = 0;
retVal = I2c_SyncWrite(ChannelId, Buffer, I2C_SIZE_1_BYTE, SlaveAddress);
I2C0_ADDRCFG.B.SOPE = 1;
retVal = I2c_SyncRead(ChannelId, ReadBuffer, I2C_SIZE_1_BYTE, SlaveAddress);
samcs
Level 1
Level 1
5 likes given 10 questions asked 25 sign-ins

The format is as below

 

1.png

0 Likes
samcs
Level 1
Level 1
5 likes given 10 questions asked 25 sign-ins

is the SOPE only working for I2c_SyncWrite()/Read(), not for I2c_AsyncWrite()/Read()?

Do you know how to implement the Restart with I2c_AsyncWrite()/Read()?

Thanks

0 Likes
Nambi
Moderator
Moderator
Moderator
50 likes received 5 likes given 100 solutions authored
0 Likes
hellopanda
Level 2
Level 2
First question asked 5 sign-ins First solution authored

What is the final answer? The other thread does not seem to have a verified answer. Which one should i refer to? 

0 Likes
Nambi
Moderator
Moderator
Moderator
50 likes received 5 likes given 100 solutions authored

Hi,

You can check the comment on  ‎Sep 05, 2023.

Best Regards.

0 Likes