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: 
Contributor
Contributor
911 Views
Registered: ‎05-29-2018

zynq 7035 uartlite can not entry interrupt

Jump to solution
 zynq 7035 PL extends a uartlite to send and receive data by interrupt mode.  I shorten TX pin and Rx pin  then send data, but can't enter  interrupt anyway. The sending data function  and hardware has been tested by polling mode, no problem. I don't know why I can't get in  interruption. 

void InitDevice(void)
{

XUartLite_WriteReg(XPAR_AXI_UARTLITE_0_BASEADDR,XUL_CONTROL_REG_OFFSET,
                               XUL_CR_FIFO_RX_RESET|XUL_CR_FIFO_TX_RESET|XUL_CR_ENABLE_ITR);
}

void InterruptHandle(void)
{
     print("InterruptHandle Scueess!\r\n");
}
 

void InitInterruptSystem()
{
int Status;
XScuGic_Config *GicIntcConfig; //GIC config

Xil_ExceptionInit();

GicIntcConfig = XScuGic_LookupConfig(INTC_DEVICE_ID);
if (NULL == GicIntcConfig)
{
print("XScuGic_LookupConfig Failure\n\r");
}

Status = XScuGic_CfgInitialize(&GicInstancePtr, GicIntcConfig,GicIntcConfig->CpuBaseAddress);

if (Status != XST_SUCCESS)
{
print("XScuGic_CfgInitialize Failure\n\r");
}

XScuGic_Connect(&GicInstancePtr, UARTLITE_INT_IRQ_ID,
(Xil_InterruptHandler)InterruptHandle, //set up the uartlite interrupt
(void *)0);


XScuGic_Enable(&GicInstancePtr, UARTLITE_INT_IRQ_ID);//enable the interrupt for the uartlite at GIC

Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
(Xil_ExceptionHandler)XScuGic_InterruptHandler,//connect to the hardware
&GicInstancePtr);
Xil_ExceptionEnable();
}
 
 

int main()
{

uint8 u8ModDataAry[2] ={cmdGetConfig,flagModInstallMethod} ;
InitDevice();
InitInterruptSystem();
while(1)
{
ump_pUart0->SendCfgData(u8ModDataAry,0x02);
Delay();

}
}
 
0 Kudos
1 Solution

Accepted Solutions
Scholar jg_bds
Scholar
813 Views
Registered: ‎02-01-2013

Re: zynq 7035 uartlite can not entry interrupt

Jump to solution

I can't follow that software stuff...

Did you re-configure the interrupt sensitivity? You can't leave it at the default value.

2019-01-02_19-24-19.jpg2019-01-02_19-29-37.jpg2019-01-02_19-23-13.jpg

-Joe G.

 

View solution in original post

8 Replies
Contributor
Contributor
903 Views
Registered: ‎05-29-2018

Re: zynq 7035 uartlite can not entry interrupt

Jump to solution
 
plcfg.png
0 Kudos
Scholar jg_bds
Scholar
814 Views
Registered: ‎02-01-2013

Re: zynq 7035 uartlite can not entry interrupt

Jump to solution

I can't follow that software stuff...

Did you re-configure the interrupt sensitivity? You can't leave it at the default value.

2019-01-02_19-24-19.jpg2019-01-02_19-29-37.jpg2019-01-02_19-23-13.jpg

-Joe G.

 

View solution in original post

Contributor
Contributor
802 Views
Registered: ‎05-29-2018

Re: zynq 7035 uartlite can not entry interrupt

Jump to solution
thanks for your reply,Joe. Do you mean that I should re-config the interrupt trigger type?the default value is high-level active,but the uart lite interrupt need rising edge type?
0 Kudos
Scholar jg_bds
Scholar
796 Views
Registered: ‎02-01-2013

Re: zynq 7035 uartlite can not entry interrupt

Jump to solution

Yes: the UART IP is using an edge, but the interrupt controller in the PS may be expecting a level. Re-configure the PS interrupt controller to expect an edge, if it's not already so configured.

You should be able to quickly check the current contents of the relevant register, to confirm if this is the issue:

2019-01-02_21-34-06.jpg

-Joe G.

 

Contributor
Contributor
775 Views
Registered: ‎05-29-2018

Re: zynq 7035 uartlite can not entry interrupt

Jump to solution

Hi,Joe.I take your suggestion,re-config the trigger type to edge trigger type,then can  enter interrupt. But I get a new problem.I did not shorten TX and RX,when  i send data ,the FPGA also enter into interrupt.This  is not normal,the RX did not receive any data ,it can not enter interrupt,even I do not send data ,the system enter interrupt too. I can not  get this why did it happen? 

XScuGic_SetPriorityTriggerType(&GicInstancePtr, UARTLITE_INT_IRQ_ID,
0xA0, 0x3);// b11 Rising edge sensitive

 

int main()

{

InitDevice();
InitInterruptSystem();
us_pUart0->Init();
ump_pUart0->Init();

 

while(1)
{

}

}

0 Kudos
Scholar jg_bds
Scholar
765 Views
Registered: ‎02-01-2013

Re: zynq 7035 uartlite can not entry interrupt

Jump to solution

2019-01-04_7-46-13.jpg

0 Kudos
Contributor
Contributor
726 Views
Registered: ‎05-29-2018

Re: zynq 7035 uartlite can not entry interrupt

Jump to solution
This situation should be unreasonable.I do not send or receive data, the sysytem should not enter the interruption. In general, it is unrelated to sending data .when uart received then enter interruption.how to config to meet my application.ONLY the uart RECEIVE data then enter interrupt
0 Kudos
Scholar jg_bds
Scholar
700 Views
Registered: ‎02-01-2013

Re: zynq 7035 uartlite can not entry interrupt

Jump to solution

I'm not sure why you're getting unexpected interrupts. If it were me, I'd put an ILA on the interrupt line from the UART IP to see if spurious interrupts were coming from it. If there are, you need to pursue that; if there aren't, there's a problem with the GIC configuration and/or the interrupt handler.

That aside, you can't get the behavior you want by using the UART Lite IP: it will send an interrupt when any of the circumstances arise that can cause an interrupt. You cannot configure it so that only one circumstance (e.g., data received only) actually causes an interrupt. For that kind of flexibility, you need to start over and use the 16550 UART IP instead of the UART Lite IP. See PG143.

-Joe G.

 

0 Kudos