cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
joancab
Teacher
Teacher
204 Views
Registered: ‎05-11-2015

Interrupt from HLS core doesn't happen

I created an IP block with HLS that has an interrupt pin:

joancab_0-1620288918071.png

I want that interrupt to be processed by a linux app. In system-user.dtsi I included:

	function_0{
		compatible="generic-uio";
		interrupt-parent = <&gic>;
		interrupts = <0 58 4>;
		....
	};

And I can see the interrupt with cat /proc/interrupts:

 42:        494          0     GICv2  80 Level     mmc0
 43:        260          0     GICv2  81 Level     mmc1
 44:        118          0     GICv2  53 Level     xuartps
 46:          0          0     GICv2  84 Edge      ff150000.watchdog
 47:          0          0     GICv2  88 Level     ams-irq
 49:          0          0     GICv2  90 Level     function_0

Now in the linux app I run:

XFunction_InterruptGlobalEnable(&FunctionInst);
XFunction_InterruptDisable(&FunctionInst, 0x3);
XFunction_InterruptClear(&FunctionInst, 0x3);
XFunction_InterruptEnable(&FunctionInst, 0x1);

(probably not the tidiest way)

And to detect the interrupt I use:

struct pollfd fd_function;
...
int fd_uio0 = open("/dev/uio0", O_RDWR);
fd_function.events = POLLIN;
fd_function.fd = fd_uio0;
...
ret = poll(&fd_function, 1, -1);

But it waits forever on the poll function. If I stop the app and type   cat /proc/interrupts   I see there were no interrupts.

But I know my HLS process ends (by polling its state), so why the interrupt doesn't happen?

0 Kudos
0 Replies