Psoc 6 SCB I2C master mode Interrupt event for read and write

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

cross mob
Dave_Long
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

Why  the I2C slave interrupt sources must be enable for the Psoc6 SCB master I2C mode read or write operation?Show as the flow pictures:

LODA_2997366_0-1618396402003.png

LODA_2997366_1-1618396429069.pngLODA_2997366_2-1618396472169.png

LODA_2997366_3-1618396530756.png

 Which interrupt event will be happened for the  every step of  i2c master operation?

 

0 Likes
1 Solution
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hi @Dave_Long 

In case of PSoC 6 it is possible to set I2C mode as master-slave. I guess in this mode it will be required to disable the slave interrupts before a master read is done and enable them after the master write is completed.

" Which interrupt event will be happened for the  every step of  i2c master operation?"

You can refer to the PDL API Reference Library: https://cypresssemiconductorco.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__scb__i... to know the I2C events that are supported. Each event is encoded in a separate bit, and therefore it is possible to notify about multiple events.

It is possible to Registers a callback function that notifies that I2C Callback Events occurred in the Cy_SCB_I2C_Interrupt using the Cy_SCB_I2C_RegisterEventCallback() function

You can refer to the code snippets provided in the PDL to configure Interrupts: https://cypresssemiconductorco.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__scb__i...

Please feel free to update for any clarifications.

Thanks and Regards

Ekta

View solution in original post

0 Likes
1 Reply
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hi @Dave_Long 

In case of PSoC 6 it is possible to set I2C mode as master-slave. I guess in this mode it will be required to disable the slave interrupts before a master read is done and enable them after the master write is completed.

" Which interrupt event will be happened for the  every step of  i2c master operation?"

You can refer to the PDL API Reference Library: https://cypresssemiconductorco.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__scb__i... to know the I2C events that are supported. Each event is encoded in a separate bit, and therefore it is possible to notify about multiple events.

It is possible to Registers a callback function that notifies that I2C Callback Events occurred in the Cy_SCB_I2C_Interrupt using the Cy_SCB_I2C_RegisterEventCallback() function

You can refer to the code snippets provided in the PDL to configure Interrupts: https://cypresssemiconductorco.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__scb__i...

Please feel free to update for any clarifications.

Thanks and Regards

Ekta

0 Likes