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: 
Participant jacob.varghese
Participant
8,348 Views
Registered: ‎05-28-2015

Uartlite in Interrupt mode

Hello,

 

I am using the Virtex - 7 board.I tried polling mode and it worked fine.Now  I want to implement the UART in Interrupt based mode. I tried some sample code from webcase, among them one file I found helpful ( http://www.xilinx.com/support/documentation/application_notes/xapp778.pdf) . I have written the code based on this reference, but with this the interrupt is coming only once second time the ISR is not getting invoked. 

 

Can anybody tell me what  I have missed ? Please help me out?I am struck with this problem for one week  now....

 

 

 

0 Kudos
4 Replies
Highlighted
Explorer
Explorer
8,340 Views
Registered: ‎11-24-2013

Re: Uartlite in Interrupt mode

Hi, Jacob,

 

could you provide some details about the hardware you are implementing? Which processor system and implementation tool are you using?

 

Regards,

Ignacio.

0 Kudos
Participant jacob.varghese
Participant
8,320 Views
Registered: ‎05-28-2015

Re: Uartlite in Interrupt mode

Hi Ignacio,

 

Thank you for  Replying.....

 

Here are the Implementation Details,

 

VIRTEX-7 FPGAXC7VX485T-2 FFG1761
Xilinx Software Development Kit 14.7
Processor : MicroBlaze
Bus interconnect : AXI


SPARTAN-6 XC6SLX45-2FGG484C
Xilinx Software Development Kit 14.7
Processor : MicroBlaze
Bus interconnect : PLB  

 

Currently I am working in Spartan-6 board, where I found this issue.The Virtex-7 board is still in development phase.Please forgive my ignorance, Is there any need that I should call interrupt enable function inside the ISR routine to make it into continuous mode.

 

 

0 Kudos
Explorer
Explorer
8,307 Views
Registered: ‎11-24-2013

Re: Uartlite in Interrupt mode

Hello!

 

I created a project with the default peripherals with the Virtex 7 that you specify and I will try to explain here how you must connect everything and which kind of software to use. Don't worry because the UART (I imagine that you mean the "Lite") it's quite easys to use in interrupt-based mode.

 

First of all, your design will have to have an interrupt controller connected to the processor interrupt line.

 

im1.JPG

 

If you created the system with the BSB and selected "Use interrupt" option in the UART component, this automatically done, but if you added it afterwards, then you have to do it manually. The procedure is shown in the next image:

 

im2.JPG

 

Once that you have these connections, you need to program the software. If it's your first time with interruptions, it could be quite tricky. But, fortunately, a nice example is provided with the driver. So, in the drivers folder (you can see it in the next image), in "examples", you will find the file "xuartlite_intr_example.c"

 

im3.JPG

 

If you open it, it perfectly explains how to work with the UART in interrupt mode. Using the debug mode (if you enabled it) you can get to understand how it works step by step. If you want to make it work, you will have to give an external loopback to your UART, which means to connect Tx and Rx pins physically.

 

I hope this helps!

 

Regards,

Ignacio.

0 Kudos
Participant jacob.varghese
Participant
8,280 Views
Registered: ‎05-28-2015

Re: Uartlite in Interrupt mode

Hello  Ignacio,

 

I tried with "xuartlite_intr_example.c" and have set the connection like you have explained  but everytime it  loop infinitely in while (Xil_AssertWait)  inside XIntc_Connect() function. I am trying to send data from putty, I have set com port and baudrate(115200)  correctly.

 

Please tell me is there anything else, I am missing.

 

Thanks and Regards

Jacob

0 Kudos