Gpio interrupt not working in FreeRTOS but working in standlone application on xilinx(zcu102)

i am using xilinx zcu102 board. I am trying to run gpio interrupt example provided in BSP by xilinx on FreeRTOS, but it is not working. Same example is working fine when run as standlone application. Program is stuck at Xil_ExceptionEnableMask Function which i have commented in program .Below is attached gpio example code:

int main(void) {
int Status;

xil_printf("GPIO Interrupt Example Test \r\n");

/*
 * Run the GPIO interrupt example, specify the parameters that
 * are generated in xparameters.h.
 */
Status = GpioIntrExample(&Intc, &Gpio, GPIO_DEVICE_ID,
			 GPIO_INTERRUPT_ID);

if (Status != XST_SUCCESS) {
	xil_printf("GPIO Interrupt Example Test Failed\r\n");
	return XST_FAILURE;
}

xil_printf("Successfully ran GPIO Interrupt Example Test\r\n");
return XST_SUCCESS;

}

int GpioIntrExample(XScuGic *Intc, XGpioPs *Gpio, u16 DeviceId, u16 GpioIntrId)
{
XGpioPs_Config *ConfigPtr;
int Status;
int Type_of_board;

/* Initialize the Gpio driver. */
ConfigPtr = XGpioPs_LookupConfig(DeviceId);
if (ConfigPtr == NULL) {
	return XST_FAILURE;
}
Type_of_board = XGetPlatform_Info();
switch (Type_of_board) {
	case XPLAT_ZYNQ_ULTRA_MP:
		Input_Bank_Pin = 22;
		Input_Pin = 22;
		Output_Pin = 23;
		break;

	case XPLAT_ZYNQ:
		Input_Bank_Pin = 14;
		Input_Pin = 14;
		Output_Pin = 10;
		break;

#ifdef versal
case XPLAT_VERSAL:
/* Accessing PMC GPIO by setting field to 1 */
Gpio->PmcGpio = 1;
Input_Bank_Pin = 4;
Input_Pin = 56;
Output_Pin = 52;
break;
#endif
}
XGpioPs_CfgInitialize(Gpio, ConfigPtr, ConfigPtr->BaseAddr);

/* Run a self-test on the GPIO device. */
Status = XGpioPs_SelfTest(Gpio);
if (Status != XST_SUCCESS) {
	return XST_FAILURE;
}

/* Set the direction for the specified pin to be input */
XGpioPs_SetDirectionPin(Gpio, Input_Pin, 0x0);

/* Set the direction for the specified pin to be output. */
XGpioPs_SetDirectionPin(Gpio, Output_Pin, 1);
XGpioPs_SetOutputEnablePin(Gpio, Output_Pin, 1);
XGpioPs_WritePin(Gpio, Output_Pin, 0x0);

/*
 * Setup the interrupts such that interrupt processing can occur. If
 * an error occurs then exit.
 */
Status = SetupInterruptSystem(Intc, Gpio, GPIO_INTERRUPT_ID);
if (Status != XST_SUCCESS) {
	return XST_FAILURE;
}

xil_printf("\n\rPush Switch button to exit\n\r");
AllButtonsPressed = FALSE;

/*
 * Loop forever while the button changes are handled by the interrupt
 * level processing.
 */
while(AllButtonsPressed == FALSE);

return XST_SUCCESS;

}

static void IntrHandler(void *CallBackRef, u32 Bank, u32 Status)
{
XGpioPs *Gpio = (XGpioPs *)CallBackRef;
u32 DataRead;

/* Push the switch button */
DataRead = XGpioPs_ReadPin(Gpio, Input_Pin);
if (DataRead != 0) {
	XGpioPs_SetDirectionPin(Gpio, Output_Pin, 1);
	XGpioPs_SetOutputEnablePin(Gpio, Output_Pin, 1);
	XGpioPs_WritePin(Gpio, Output_Pin, DataRead);
	AllButtonsPressed = TRUE;
}

}

static int SetupInterruptSystem(XScuGic *GicInstancePtr, XGpioPs *Gpio,
u16 GpioIntrId)
{
int Status;

XScuGic_Config *IntcConfig; /* Instance of the interrupt controller */

Xil_ExceptionInit();

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

Status = XScuGic_CfgInitialize(GicInstancePtr, IntcConfig,
				IntcConfig->CpuBaseAddress);
if (Status != XST_SUCCESS) {
	return XST_FAILURE;
}


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

/*
 * Connect the device driver handler that will be called when an
 * interrupt for the device occurs, the handler defined above performs
 * the specific interrupt processing for the device.
 */
Status = XScuGic_Connect(GicInstancePtr, GpioIntrId,
			(Xil_ExceptionHandler)XGpioPs_IntrHandler,
			(void *)Gpio);
if (Status != XST_SUCCESS) {
	return Status;
}

/* Enable falling edge interrupts for all the pins in GPIO bank. */
XGpioPs_SetIntrType(Gpio, GPIO_BANK, 0x00, 0xFFFFFFFF, 0x00);

/* Set the handler for gpio interrupts. */
XGpioPs_SetCallbackHandler(Gpio, (void *)Gpio, IntrHandler);


/* Enable the GPIO interrupts of GPIO Bank. */
XGpioPs_IntrEnable(Gpio, GPIO_BANK, (1 << Input_Bank_Pin));


/* Enable the interrupt for the GPIO device. */
XScuGic_Enable(GicInstancePtr, GpioIntrId);


/* Enable interrupts in the Processor. */
Xil_ExceptionEnableMask(XIL_EXCEPTION_IRQ);  
 **/* Program stuck in above function */**
return XST_SUCCESS;

}
// End of Code

Same issue is persistent with all interrupt examples using xil_ExceptionEnable call. Kindly guide as i am new to this board as well FreeRTOS.

See Gpio interrupt not working in FreeRTOS but working in standlone application on xilinx