# Using interrupts

### Using interrupts

To set up an interrupt, you must add it in the **Platform** RTD driver. In the Interrupt Controller tab, add a new entry to the table. In the **Interrupt Name** column you must select the hardware interrupt you want to use. In the **Handler** column you need to put the isr name the driver expects.

<figure><img src="https://2412084329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L9GLtaxrQtBdBRsFIJB%2Fuploads%2FDDOOh71L604t0g8a3FTy%2Fimage.png?alt=media&#x26;token=c657beed-cd8c-4fcf-bcbf-304a3d714aa8" alt=""><figcaption></figcaption></figure>

To find the isr name the driver expects, you must search for it in the RTD driver source code.&#x20;

<figure><img src="https://2412084329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L9GLtaxrQtBdBRsFIJB%2Fuploads%2FDNiaD8I9O4x7mGVX5PdD%2Fimage.png?alt=media&#x26;token=0e3d66ba-4c9b-4509-bda8-9b61759bfb30" alt=""><figcaption><p>Path to the RTD drivers</p></figcaption></figure>

For example, if you want an interrupt on a PWM channel that is using a FTM hardware instance, you must look in **Ftm\_Pwm\_Ip\_Irq.h**

<figure><img src="https://2412084329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L9GLtaxrQtBdBRsFIJB%2Fuploads%2FP1jbR3EoimsMPAxf8Pvg%2Fimage.png?alt=media&#x26;token=190496d4-917c-4723-9118-86e22e8ef983" alt=""><figcaption><p>Path to the file Ftm_Pwm_Irq.h</p></figcaption></figure>

Inside the file, search for ***ISR(*** with any app you want using **Ctrl + f**. In this example you can see the search in Notepad++.

<figure><img src="https://2412084329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L9GLtaxrQtBdBRsFIJB%2Fuploads%2FYksPtjCdNkBqUWILtTaY%2Fimage.png?alt=media&#x26;token=824d1d37-d8b9-4795-b2ad-8ffa21ad3073" alt=""><figcaption><p>Search results are displayed on the bottom</p></figcaption></figure>

Search for the name of the isr that you need and copy it. For example, to setup an interrupt on a rising/falling edge of a PWM signal using FTM instance 1 channel 1, copy the name **FTM\_1\_CH\_0\_CH\_1\_ISR.** Go back to the Platform driver and paste the name in the **Handler** column.
