LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA to host interrupt transfer on PCI-8254R

Hi,
I have a problem with communicating the IRQ request from the 8254R FPGA target to the host. I am posting a simple code which shows the problem. The FPGA code periodically raises the IRQ request and the host indefinitely waits. However, the wait never comes to an end. What am I doing wrong here?
 
Vladimir

View my profile on LinkedIn
0 Kudos
Message 1 of 7
(4,523 Views)
I'm sorry, it looks like this was just a false alarm. After I've restarted my computer, the interrupts seem to work fine Smiley Wink
 
Vladimir

View my profile on LinkedIn
0 Kudos
Message 2 of 7
(4,503 Views)

Back to my original problem, I've noticed that it happens every time the FPGA VI reference is not closed properly. If the host VI's execution is aborted with the FPGA VI reference still open, in the next run the interrupts stop coming and the only way to get them working again is to restart the computer (which probably does some kind of reset to the FPGA hardware). Software reset of the FPGA VI reference through the Invoke Node doesn't work either. Does anyone know how to reset the FPGA without restarting the computer?

Vladimir


View my profile on LinkedIn
0 Kudos
Message 3 of 7
(4,500 Views)
Vladimir,

I do not know of a way to reset the card or the FPGA without resetting your computer. Additionally, when the host VI aborts, this leaves the system in an unpredictable state as to the code and its execution, so you should try to avoid this when possible. However, you should be able to avoid seeing this behavior with the following steps:

1) On some targets, you are able to customize the Open FPGA VI Reference to open and run the FPGA VI. This would ensure that each time the host code is executed, the FPGA code is downloaded and run. Right-click the Open FPGA VI Reference to set this to open and run. I am not as familiar with your PCI-8254R, so you should check to see if this is an option.
2) If this is not an option, you should use an invoke node after the Open FPGA VI Reference to run the VI (use the Run method).

As I mentioned, this should allow the FPGA code to run each time the host VI runs. The interrupts should then continue to be read on the host.

Mike D.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 7
(4,486 Views)

Hi Mike

Thanks for your reply. I am actually using the "Open and Run" option. The FPGA VI is re-run again correctly even after an Abort and is working well, except for the interrupts. However, I've recently found out that it is sufficient to restart LabVIEW to get the interrupts working, so now it is not as annoying as restarting the whole computer. I think I can do with it now, and I'll try to make my programs bug-free, so that I won't have to use Abort Execution too often Smiley Wink.

Vladimir


View my profile on LinkedIn
0 Kudos
Message 5 of 7
(4,471 Views)

What version of the NI-IMAQ I/O driver are you using?

Regards,

Joseph D.

National Instruments

 

0 Kudos
Message 6 of 7
(4,397 Views)

2.0


View my profile on LinkedIn
0 Kudos
Message 7 of 7
(4,372 Views)