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

cross mob
WiFl_2253191
Level 2
Level 2

Using the Fixed-Function I2C Slave component on PSoC5LP, is there any way to get an interrupt when the Master writes?  The only way I have found to know if the Slave has received data from the Master is to poll the Slave's status register and look for I2C_SSTAT_WR_BUSY or I2C_CFG_REG bits.  I need to respond quickly, but don't want to waste all my processor time polling the register.

   

Is there any callback function I can use, or a way to enable an interrupt pin?

   

Thanks!
-Will

0 Likes
1 Solution
pacr_284376
Level 5
Level 5
100 replies posted 10 solutions authored 50 sign-ins

I use the Twi_ISR_ExitCallback(). By reading the Twi_SlaveStatus you can see if it was a Master Read (0x11) or Master Write(0x10).

   

More information on Macro Callbacks on page 29 of 61 of the I2C Master/Multi-Master/Slave V3.50 component datasheet 

View solution in original post

0 Likes
1 Reply
pacr_284376
Level 5
Level 5
100 replies posted 10 solutions authored 50 sign-ins

I use the Twi_ISR_ExitCallback(). By reading the Twi_SlaveStatus you can see if it was a Master Read (0x11) or Master Write(0x10).

   

More information on Macro Callbacks on page 29 of 61 of the I2C Master/Multi-Master/Slave V3.50 component datasheet 

0 Likes