CY8CKIT-059: I2C Fixed Function Master end of transfer interrupt or flag?

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

cross mob
AaRo_4592221
Level 1
Level 1
First like received

How do I set a flag when the Fixed Function I2C Master is done with its transfer? I am sending 33 packets of 32 bytes frequently and it uses a lot of idle delay time waiting for the transfer to be done when I need it to be running other parts of code? I can't seem to find an interrupt callback for when the transfer is done.

0 Likes
1 Solution
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I skimmed the datasheet of I2C Fixed.

I think that If you use I2C_MasterWriteBuf(), you can check the status in the beginning of the loop

and do other thing, then when finally transaction complete check the result/status.

000-datasheet.JPG

moto

View solution in original post

0 Likes
2 Replies
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I skimmed the datasheet of I2C Fixed.

I think that If you use I2C_MasterWriteBuf(), you can check the status in the beginning of the loop

and do other thing, then when finally transaction complete check the result/status.

000-datasheet.JPG

moto

0 Likes

Motoo, Thanks for the reply. I'll look at using that function, I must of overlooked it in the datasheet, I was thinking it might just be an I2C_Status() command.

I also found while looking through the I2C class itself that it has an I2C_state variable and it returns to I2C_SM_IDLE when it is done with a transfer, though it will be a lot safer to use that status function.