Using interrupts
Last updated
Last updated
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.
To find the isr name the driver expects, you must search for it in the RTD driver source code.
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
Inside the file, search for ISR( with any app you want using Ctrl + f. In this example you can see the search in Notepad++.
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.