UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor mindthomas
Visitor
6,628 Views
Registered: ‎08-02-2017

Fixed Interval Timer interrupt on Zynq

Hi.

How do you initialize/enable the Fixed Interval Timer within the Zynq?

I have tried to use the FIT IP block and connected it to a PS interrupt input and enabled it using the following lines, however that did not work.

	// Connect FIT interrupt to handler
	XScuGic_Connect(&INTCInst,
			XPAR_FABRIC_FIT_TIMER_0_INTERRUPT_INTR,
			(Xil_ExceptionHandler)FIT_Intr_Handler,
			(void *)NULL);

	// Enable FIT interrupts in the controller
	XScuGic_Enable(&INTCInst, XPAR_FABRIC_FIT_TIMER_0_INTERRUPT_INTR);

Then I tried to verify whether the FIT block was actually running by connecting the interrupt output to an LED/output pin but also connecting the interrupt to a 1-bit counter as I thought the interrupt pin might just be a short 1-clock pulse and not a square-wave output.

 

None of the above seemed to work so I am currently without clue.

Any hints would be appreciated.

 

PS. What about the global timer? I can't seem to use XTime_GetTime out of the box. Do I have to enable anything here as well?

 

Best regards

Thomas Jespersen

0 Kudos
20 Replies
Explorer
Explorer
6,596 Views
Registered: ‎04-05-2016

Re: Fixed Interval Timer interrupt on Zynq

AR50572 may be of interest to you:

 

https://www.xilinx.com/support/answers/50572.html

 

Here is the C file from the example project:

 

/*
 * Pl_timer_intr_test.c
 *
 *  Created on: 2012-6-8
 *      Author: yzhang
 */

#include <stdio.h>
//#include "platform.h"
#include "xil_types.h"

#include "xtmrctr.h"
#include "xparameters.h"

#include "xil_io.h"
#include "xil_exception.h"
#include "xscugic.h"


XScuGic InterruptController; /* Instance of the Interrupt Controller */
static XScuGic_Config *GicConfig;/* The configuration parameters of the
controller */

//void print(char *str);
extern char inbyte(void);
void Timer_InterruptHandler(void *data, u8 TmrCtrNumber)
{
    print(" Interrupt acknowledged \n \r ");
    print("\r\n");
    print("\r\n");
    XTmrCtr_Stop(data,TmrCtrNumber);
    XTmrCtr_Reset(data,TmrCtrNumber);
    XTmrCtr_Start(data,TmrCtrNumber);
}

int SetUpInterruptSystem(XScuGic *XScuGicInstancePtr)
{
    /*
    * Connect the interrupt controller interrupt handler to the hardware
    * interrupt handling logic in the ARM processor.
    */
    Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
    (Xil_ExceptionHandler) XScuGic_InterruptHandler,
    XScuGicInstancePtr);
    /*
    * Enable interrupts in the ARM
    */
    Xil_ExceptionEnable();
    return XST_SUCCESS;
}

int ScuGicInterrupt_Init(u16 DeviceId,XTmrCtr *TimerInstancePtr)
{
    int Status;
    /*
    * Initialize the interrupt controller driver so that it is ready to
    * use.
    * */
    GicConfig = XScuGic_LookupConfig(DeviceId);
    if (NULL == GicConfig) {
        return XST_FAILURE;
    }
    Status = XScuGic_CfgInitialize(&InterruptController, GicConfig,
    GicConfig->CpuBaseAddress);
    if (Status != XST_SUCCESS) {
        return XST_FAILURE;
    }

    /*
    * Setup the Interrupt System
    * */
    Status = SetUpInterruptSystem(&InterruptController);
    if (Status != XST_SUCCESS) {
        return XST_FAILURE;
    }

    /*
    * Connect a device driver handler that will be called when an
    * interrupt for the device occurs, the device driver handler performs
    * the specific interrupt processing for the device
    */
    Status = XScuGic_Connect(&InterruptController,
    XPAR_FABRIC_AXI_TIMER_0_INTERRUPT_INTR,
    (Xil_ExceptionHandler)XTmrCtr_InterruptHandler,
    (void *)TimerInstancePtr);
    if (Status != XST_SUCCESS) {
        return XST_FAILURE;
    }

    /*
    * Enable the interrupt for the device and then cause (simulate) an
    * interrupt so the handlers will be called
    */
    XScuGic_Enable(&InterruptController, XPAR_FABRIC_AXI_TIMER_0_INTERRUPT_INTR);
    return XST_SUCCESS;
}

int main()
{

    XTmrCtr TimerInstancePtr;
    int xStatus;

    print("##### Application Starts #####\n\r");
    print("\r\n");
    xStatus = XTmrCtr_Initialize(&TimerInstancePtr,XPAR_AXI_TIMER_0_DEVICE_ID);
    if(XST_SUCCESS != xStatus)
        print("TIMER INIT FAILED \n\r");

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //Set Timer Handler
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    XTmrCtr_SetHandler(
        &TimerInstancePtr,
        Timer_InterruptHandler,
        &TimerInstancePtr
    );

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //Setting timer Reset Value
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    XTmrCtr_SetResetValue(
        &TimerInstancePtr,
        0, //Change with generic value
        0xf8000000
    );

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //Setting timer Option (Interrupt Mode And Auto Reload )
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    XTmrCtr_SetOptions(
        &TimerInstancePtr,
        XPAR_AXI_TIMER_0_DEVICE_ID,
        (XTC_INT_MODE_OPTION | XTC_AUTO_RELOAD_OPTION )
    );

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //SCUGIC interrupt controller Intialization
    //Registration of the Timer ISR
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    xStatus=ScuGicInterrupt_Init(XPAR_PS7_SCUGIC_0_DEVICE_ID,&TimerInstancePtr);
    if(XST_SUCCESS != xStatus)
        print(" :( SCUGIC INIT FAILED \n\r");

    //Start Timer

    XTmrCtr_Start(&TimerInstancePtr,0);
        print("timer start \n\r");

    //Wait For interrupt;

    print("Wait for the Timer interrupt to tigger \r\n");
    print("########################################\r\n");
    print(" \r\n");

    while(1)
    {
    }

	cleanup_platform();
	return 0;
}
Scholar hbucher
Scholar
6,590 Views
Registered: ‎03-22-2016

Re: Fixed Interval Timer interrupt on Zynq

@mindthomas 

Just to complement the excellent response from @timduffy - in general if you want examples from the SDK, they are available in the MSS page.

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
examples.PNG
Scholar ericv
Scholar
6,575 Views
Registered: ‎04-13-2015

Re: Fixed Interval Timer interrupt on Zynq

@mindthomas

 

You may want to stay away from the global timer as it's much simpler to use the private timer for a periodic interrupt.

Here's what you need to do to set-up the private timer for periodic interrupts.

The GIC interrupt # for the private timer is 29 and the private timer clock is 1/2 the CPU clock.

e.g., at 666 MHz, to get a 1ms period, set Reload to (666000000/2)/1000.

 

void TIMERinit(unsigned int Reload)
{
volatile unsigned int *TimReg;
    TimReg    = 0xF8F00000;               /* Base of Peripherals                             */
    TimReg   += 0x600/sizeof(unsigned int); /* Private timer register base address           */
    TimReg[2] = 0;                        /* Disable timer & interrupts                      */
    TimReg[0] = Reload;                   /* Private timer load value                        */
    TimReg[1] = Reload;                   /* Start the count at reload value                 */
                                          /* Private timer control register                  */
    TimReg[2] = (0<<8)                    /* Prescaler = /1                                  */
              | (1<<2)                    /* Interrupt enable                                */
              | (1<<1)                    /* Auto-reload                                     */
              | (1<<0);                   /* Timer enable                                    */
    return;
}

 

Visitor mindthomas
Visitor
6,562 Views
Registered: ‎08-02-2017

Re: Fixed Interval Timer interrupt on Zynq

Thank you for your replies. Unfortunately none of them really answers my question.

I requested some help or hint about the Fixed Interval Timer as I intended to use this to save logic gates (the AXI Timer is much more complex). Unfortunately the example shown by @timduffy

 

0 Kudos
Scholar ericv
Scholar
6,553 Views
Registered: ‎04-13-2015

Re: Fixed Interval Timer interrupt on Zynq

@mindthomas

The global timer is a very nice and cleverly designed timer, but a bit more complex to deal with than private timers.

It is a 64 bit instead of 32 bit timer, therefore it offers a much larger range of interval periods.

It does have the capability to interrupt all cores instead of the private timer's associated core.

My advice was to keep things as simple for you as possible.

 

Regards

Explorer
Explorer
6,548 Views
Registered: ‎04-05-2016

Re: Fixed Interval Timer interrupt on Zynq

"Unfortunately none of them really answers my question." - As @hbucher stated, there are examples that are available in SDK.  He did answer your question.

 

Connect the interrupt output of the Fixed Interval Timer to one of the IRQ_F2P inputs on the Zynq block on your block diagram, and then use the example source code that I posted, or from the Imported Examples that @hbucher showed in his screen shot to fire an Interrupt Service Routine ( ISR ) when the interrupt happens.

 

As a site note, the AXI Timer is 307 LUT and 240 FF, the Fixed Timer is 10 LUT and 5 FF when set to 4096 ( presumably it would be more the higher you create the fixed counter ).  Certainly the Fixed Timer is less resources, but 307/240 is pretty darn small ...

Visitor mindthomas
Visitor
6,547 Views
Registered: ‎08-02-2017

Re: Fixed Interval Timer interrupt on Zynq

 

timduffy wrote:

"Unfortunately none of them really answers my question." - As @hbucher stated, there are examples that are available in SDK.  He did answer your question.


There doesn't really seem to be any examples of neither the Global Timer nor the Fixed Interval Timer. So unfortunately no hints in the direction of the question.


timduffy wrote:

Connect the interrupt output of the Fixed Interval Timer to one of the IRQ_F2P inputs on the Zynq block on your block diagram, and then use the example source code that I posted, or from the Imported Examples that @hbucher showed in his screen shot to fire an Interrupt Service Routine ( ISR ) when the interrupt happens.

 


I already tried this but the interrupt didn't seem to fire at all. That was when I decided to try and connect the interrupt output to a physical pin (LED) to see if I could see any action at all.

0 Kudos
Explorer
Explorer
6,544 Views
Registered: ‎04-05-2016

Re: Fixed Interval Timer interrupt on Zynq

If you believe it is an issue with the FIT not firing, run it to a pin and place a scope on it. Drop your clock down to a few MHz so you can see it.

If the FIT is firing, and you have the interrupt out of it hooked up to the Zynq correctly, there is no reason why the interrupt shouldn't fire.

Can you post a picture of your block diagram to show us how it is connected?
0 Kudos
Visitor mindthomas
Visitor
6,541 Views
Registered: ‎08-02-2017

Re: Fixed Interval Timer interrupt on Zynq

But how should the interrupt controller be configured with the FIT? See the code I posted in the top (first post).

What I seem to be missing with the FIT is an interrupt handler function similar to XTmrCtr_InterruptHandler and also a CallBackRef similar to TmrInstancePtr.

 

This is my design currently:

FIT-design.jpg

0 Kudos
Visitor mindthomas
Visitor
5,448 Views
Registered: ‎08-02-2017

Re: Fixed Interval Timer interrupt on Zynq

I have now checked with an oscilloscope and I am able to detect a 1-clock tick output (10 ns matching the 100 MHz FCLK) at the FIT programmed interval of 1 ms.

However I am not able to get th interrupt to fire.

0 Kudos
Explorer
Explorer
5,434 Views
Registered: ‎04-05-2016

Re: Fixed Interval Timer interrupt on Zynq

Per the Zynq TRM, on page 229, the IRQF2P[0] can be a rising edge interrupt.

 

https://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf

 

So if you have a 10ns wide pulse going into the interrupt controller, it *should* register as an interrupt if connected to the IRQF2P lowest bit.

 

Now you can setup the GIC to handle the interrupt.  Here is the example from Xilinx on how to use the GIC ( previously called out by @hbucher ... ):

 

https://github.com/Xilinx/embeddedsw/blob/master/XilinxProcessorIPLib/drivers/scugic/examples/xscugic_example.c

 

On line INTC_DEVICE_INT_ID we see that the interrupt ID is defined as 0x0E, or software interrupt 14 ( we know this is software interrupt 14 because on paged 228 of the Zynq TRM, table 7-2 tells us this ).  We'll want to change this #define to be 61 ( for IRQP2F[0] ) per table 7-4 on page 230.

 

Line 223 is not needed, since you will be creating the interrupt from fabric rather than needing to simulate it with software.

 

All in all, your code should look something like this ( note: I did not compile this, just copy pasted from the various resources that were already posted in this thread ):

 

#include <stdio.h>
#include <stdlib.h>
#include "xil_io.h"
#include "xil_exception.h"
#include "xparameters.h"
#include "xil_cache.h"
#include "xil_printf.h"
#include "xil_types.h"
#include "xscugic.h"

XScuGic InterruptController;
static XScuGic_Config *GicConfig;

volatile static int InterruptProcessed = FALSE;

#define INTC_DEVICE_ID		XPAR_SCUGIC_0_DEVICE_ID
#define INTC_DEVICE_INT_ID	0x3D


void DeviceDriverHandler(void *CallbackRef)
{
	/*
	 * Indicate the interrupt has been processed using a shared variable
	 */
	InterruptProcessed = TRUE;
    
    printf("Interrupt!!!\r\n");
    
}

int main()
{

    int Status;

	/*
	 * Initialize the interrupt controller driver so that it is ready to
	 * use.
	 */
	GicConfig = XScuGic_LookupConfig(DeviceId);
	if (NULL == GicConfig) {
		return XST_FAILURE;
	}

	Status = XScuGic_CfgInitialize(&InterruptController, GicConfig,
					GicConfig->CpuBaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}


	/*
	 * Perform a self-test to ensure that the hardware was built
	 * correctly
	 */
	Status = XScuGic_SelfTest(&InterruptController);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}


	/*
	 * Setup the Interrupt System
	 */
	Status = SetUpInterruptSystem(&InterruptController);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	/*
	 * Connect a device driver handler that will be called when an
	 * interrupt for the device occurs, the device driver handler performs
	 * the specific interrupt processing for the device
	 */
	Status = XScuGic_Connect(&InterruptController, INTC_DEVICE_INT_ID,
			   (Xil_ExceptionHandler)DeviceDriverHandler,
			   (void *)&InterruptController);

	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	/*
	 * Enable the interrupt for the device and then cause (simulate) an
	 * interrupt so the handlers will be called
	 */
	XScuGic_Enable(&InterruptController, INTC_DEVICE_INT_ID);

	/*
	 * Wait for the interrupt to be processed, if the interrupt does not
	 * occur this loop will wait forever
	 */
	while (1) {
		/*
		 * If the interrupt occurred which is indicated by the global
		 * variable which is set in the device driver handler, then
		 * stop waiting
		 */
		if (InterruptProcessed) {
			break;
		}
	}

    return XST_SUCCESS;
    
}

 

Visitor mindthomas
Visitor
5,424 Views
Registered: ‎08-02-2017

Re: Fixed Interval Timer interrupt on Zynq

So you think the error is due to the fact that the interrupt is connect as bit 2 on the IRQF2P port?

I will try your suggestions and let you know the outcome.

0 Kudos
Explorer
Explorer
5,362 Views
Registered: ‎04-05-2016

Re: Fixed Interval Timer interrupt on Zynq

Were you able to get this working?
0 Kudos
Visitor mindthomas
Visitor
5,346 Views
Registered: ‎08-02-2017

Re: Fixed Interval Timer interrupt on Zynq

Nope, not yet. Still trying, but I will let you know soon.

0 Kudos
Visitor mindthomas
Visitor
5,303 Views
Registered: ‎08-02-2017

Re: Fixed Interval Timer interrupt on Zynq

Nope. Unfortunately I still don't have any luck.

I have modified your code to the one shown below (to use the FIT timer and configure the interrupt properly). The design is shown in the picture below the code.

 

When running the project I only get the "FIT Example Test" output in the console and nothing else. A breakpoint in the interrupt handler is not triggered either.

 

 

#include <stdio.h>
#include <stdlib.h>
#include "xil_io.h"
#include "xil_exception.h"
#include "xparameters.h"
#include "xil_cache.h"
#include "xil_printf.h"
#include "xil_types.h"
#include "xscugic.h"

XScuGic InterruptController;
static XScuGic_Config *GicConfig;

volatile static int InterruptProcessed = FALSE;

#define INTC_DEVICE_ID		XPAR_SCUGIC_0_DEVICE_ID
#define INTC_DEVICE_INT_ID	XPAR_FABRIC_FIT_TIMER_0_INTERRUPT_INTR

int SetUpInterruptSystem(XScuGic *XScuGicInstancePtr);

void DeviceDriverHandler(void *CallbackRef)
{
	/*
	 * Indicate the interrupt has been processed using a shared variable
	 */
	InterruptProcessed = TRUE;

    xil_printf("Interrupt!!!\r\n");

}

int main()
{

    int Status;

    xil_printf("FIT Example Test\r\n");

	/*
	 * Initialize the interrupt controller driver so that it is ready to
	 * use.
	 */
	GicConfig = XScuGic_LookupConfig(INTC_DEVICE_ID);
	if (NULL == GicConfig) {
		xil_printf("Fail 1\r\n");
		return XST_FAILURE;
	}

	Status = XScuGic_CfgInitialize(&InterruptController, GicConfig,
					GicConfig->CpuBaseAddress);
	if (Status != XST_SUCCESS) {
		xil_printf("Fail 2\r\n");
		return XST_FAILURE;
	}


	/*
	 * Perform a self-test to ensure that the hardware was built
	 * correctly
	 */
	Status = XScuGic_SelfTest(&InterruptController);
	if (Status != XST_SUCCESS) {
		xil_printf("Fail 3\r\n");
		return XST_FAILURE;
	}


	/*
	 * Setup the Interrupt System
	 */
	Status = SetUpInterruptSystem(&InterruptController);
	if (Status != XST_SUCCESS) {
		xil_printf("Fail 4\r\n");
		return XST_FAILURE;
	}

	/*
	 * Connect a device driver handler that will be called when an
	 * interrupt for the device occurs, the device driver handler performs
	 * the specific interrupt processing for the device
	 */
	Status = XScuGic_Connect(&InterruptController, INTC_DEVICE_INT_ID,
			   (Xil_ExceptionHandler)DeviceDriverHandler,
			   (void *)&InterruptController);

	if (Status != XST_SUCCESS) {
		xil_printf("Fail 5\r\n");
		return XST_FAILURE;
	}

	/*
	 * Enable the interrupt for the device and then cause (simulate) an
	 * interrupt so the handlers will be called
	 */
	XScuGic_Enable(&InterruptController, INTC_DEVICE_INT_ID);

	/*
	 * Wait for the interrupt to be processed, if the interrupt does not
	 * occur this loop will wait forever
	 */
	while (1) {
		/*
		 * If the interrupt occurred which is indicated by the global
		 * variable which is set in the device driver handler, then
		 * stop waiting
		 */
		if (InterruptProcessed) {
			break;
		}
	}

    return XST_SUCCESS;

}

int SetUpInterruptSystem(XScuGic *XScuGicInstancePtr)
{

	/*
	 * Connect the interrupt controller interrupt handler to the hardware
	 * interrupt handling logic in the ARM processor.
	 */
	Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
			(Xil_ExceptionHandler) XScuGic_InterruptHandler,
			XScuGicInstancePtr);

	/*
	 * Enable interrupts in the ARM
	 */
	Xil_ExceptionEnable();

	return XST_SUCCESS;
}

 

FIT_Test.png

 

0 Kudos
Visitor mindthomas
Visitor
5,233 Views
Registered: ‎08-02-2017

Re: Fixed Interval Timer interrupt on Zynq

Any suggestions? :(

0 Kudos
Scholar ericv
Scholar
5,219 Views
Registered: ‎04-13-2015

Re: Fixed Interval Timer interrupt on Zynq

@mindthomas

 

To make sure you are using the right interrupt number, if you have the patience, you may want to try this iterative bulk approach:

 

- Enable all 1024 interrupt sources in the GIC (GIC_ISRENABLERn group)

   write 0xFFFFFFFF to addresses 0xF8F01100 -> 0xF8F0117C

- Put a break-point at the IRQ interrupt handler.

- Run your app

- At break-point hit, read the GICC_IAR register (address 0xF8F0010C)

     The lower 10 bits holds the interrupt number that trigger this interrupt.

     Look in the TRM to see where that ISR is mapped to a PS peripheral, and disable it in the GIC_ISRENABLERn:

           The corresponding register of that number is 0xF8F01100 + NUMBER/32 and the bit to be cleared is bit NUMBER%32

            If the number isn't listed, this could be your interrupt.

     BTW, ignore interrupt #1023, it's the spurious interrupt and it's non-maskable.

     Redo from start, with the GIC_ISRENABLERn bits of the ISRs to ignore cleared.

 

If after having removed all known interrupts source there are no more interrupts, it will confirm the timer is not properly connected to the GIC.

 

Regards.

 

0 Kudos
Visitor mindthomas
Visitor
5,161 Views
Registered: ‎08-02-2017

Re: Fixed Interval Timer interrupt on Zynq

Thanks for the suggestion however I find it a bit too cumbersome and unstructured, like a trial and error approach :(

I was hoping that the Interrupt source setup would work out of the box, including using the Interrupt ID from the generated SDK.

Anyone from Xilinx with a hint?

0 Kudos
Scholar ericv
Scholar
5,138 Views
Registered: ‎04-13-2015

Re: Fixed Interval Timer interrupt on Zynq

@mindthomas

 

You have to make sure the the GICD_ICFGRn register entry is set for edge trigger and not level trigger (I forgot to specify it in the iterative search).

By default on the Zynq, they are set to level and your timer generates a fairly short pulse (10 ns).

I don't see a call to XScuGic_SetPriTrigTypeByDistAddr() in your code to set it to edge.

 

Regards

 

 

Visitor mindthomas
Visitor
3,873 Views
Registered: ‎08-02-2017

Re: Fixed Interval Timer interrupt on Zynq

Fantastic, that worked :)

Adding the following line just before the XScuGic_Enable call made the interrupts appear:

XScuGic_SetPriTrigTypeByDistAddr(XPAR_SCUGIC_0_DIST_BASEADDR, INTC_DEVICE_INT_ID, 0xA0, 0x03);

Where 0x03 sets the rising edge property and 0xA0 just defines an arbitrary interrupt priority (0 is highest priority).

0 Kudos