cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jack1977
Explorer
Explorer
252 Views
Registered: ‎09-26-2014

Interrupt triggered on both levels

Hello. I use axi_gpio for generate interrupt, and UIO driver.

In HW design i use VIO connected to AXI_GPIO. Then i set VIO to higth level, i get interrupt, and then I reset the flag.

 

while (1) {

u_int32_t info = 1; /* unmask */
ssize_t nb = write(fd, &info, sizeof(info));

if (nb < sizeof(info)) {
    perror("write");
    close(fd);
    exit(EXIT_FAILURE);
}

struct pollfd fds = {
.fd = fd,
.events = POLLIN,
};

int ret = poll(&fds, 1, -1);

if (ret >= 1) {
      nb = read(fd, &info, sizeof(info));
           if (nb == sizeof(info)){

                printf("Interrupt%d\n", counter);
                counter = counter + 1;
               *((volatile unsigned *)(gpio_ptr + GPIO_IP_ISR)) = 0x1;

         }

    }

}

This work is fine. But then i change value in VIO from "1" to "0" level, I get an interrupt again.

This should not happen - in pl.dtsi line interrupts = <0 91 4>;
set the interrupt sensitive in to high level.

 

 

 

0 Kudos
0 Replies