PSOC5 LP, I2C Master

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

cross mob
Anonymous
Not applicable

 How to use interrupt method to do I2C master transfer with EEPROM(I2C Slave)?

   

Is there any reference code?

   

Because when I try this method, it always failed.

   

I have used start(write)->sendbyte()->start(read)->receivebyte()->stop() to do the operation, it works fine.

   

But I still want to try interrupt method: writebuffer(no_stop)->readbuffer(repeatstart) to do the same thing. Because sometime, the first method will fail... It hangup in start(write), there was a while(1)  loop in BSP, that's not good.

0 Likes
1 Reply
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

The MasterWriteBuf() / MasterReadBuf() methods already work with interrupts. They can generate also the start condition. Is this what you need? If not - what do you want to achieve?

0 Likes