Hi Harshal Pawar,
In addition to Edward, I recommend this technical note of Defining Interrupt Functions.
There are two methods to define an interrupt. I recommend you the second one. "The keyword “interrupt”"
For detail, see attached TN101.
Have a great day,
Jun Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------