cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

LODA_2997366
New Contributor II

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
Moderator
Moderator

Hi @LODA_2997366 

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
Moderator
Moderator

Hi @LODA_2997366 

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
Top labels