How to configure I2C slave interrupt sources?

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

cross mob
Anonymous
Not applicable

From the Architecture Reference Manual section 25.6.3 (I2C interrupts) someone can see that there is a number of sources that can trigger an I2C Slave IRQ.

However, I cannot seem to be able to figure out how to configure a specific source to trigger an IRQ (e.g.I2C slave address matched) and the corresponding routine to service it.


It seems that I am missing something fundamental, any help would be appreciated!

0 Likes
1 Solution
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

Yes, all sources listed in Architecture Reference Manual section 25.6.3 (I2C interrupts) can be possible to trigger I2C interrupts. From the outside, all I2C interrupts has no difference as each interrupt output is the

logical OR of the group of all possible interrupt sources. What user need to do is just map the general I2C interrupt to proper core and choose the interrupt priority accordingly.

There are a lot online resources for your references --

code example - CE221119 - PSOC 6 MCU I2C SLAVE

application note - AN217666 - PSoC 6 MCU Interrupts​ in which Chapter#3 'Interrupt Configuration' may be helpful to your case.

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

Hi - Specific to I2C Address Matching check, you may use - SCB_SetI2cAddressCustomInterruptHandler. Please check "Accept matching address RX FIFO" in the SCB component datasheet for sample code for the interrupt handler.

0 Likes
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

Yes, all sources listed in Architecture Reference Manual section 25.6.3 (I2C interrupts) can be possible to trigger I2C interrupts. From the outside, all I2C interrupts has no difference as each interrupt output is the

logical OR of the group of all possible interrupt sources. What user need to do is just map the general I2C interrupt to proper core and choose the interrupt priority accordingly.

There are a lot online resources for your references --

code example - CE221119 - PSOC 6 MCU I2C SLAVE

application note - AN217666 - PSoC 6 MCU Interrupts​ in which Chapter#3 'Interrupt Configuration' may be helpful to your case.

0 Likes
Anonymous
Not applicable

Ok, it seems that I was missing the logical OR of the group.

Thanks for the response, I will take a look at the references.

0 Likes