Altera_Forum
Honored Contributor
14 years agoCan't reset PIO edge capture using IOWR_ALTERA_AVALON_PIO_EDGE_CAP
Dear experts,
I am Nios beginner. I wonder why I cannot reset the edge capture register using IOWR_ALTERA_AVALON_PIO_EDGE_CAP (to reset it inside my ISR)? //after first interrupt, edge capture register became 1 and remain 1 no matter how many time I reset it using IOWR_ALTERA_AVALON_PIO_EDGE_CAP pio_cnt=IORD_ALTERA_AVALON_PIO_EDGE_CAP(PIO_BASE); alt_printf("pio_cnt= %x \n", pio_cnt); // pio_cnt=1 IOWR_ALTERA_AVALON_PIO_EDGE_CAP (PIO_BASE,0); //try to reset to zero pio_cnt=IORD_ALTERA_AVALON_PIO_EDGE_CAP(PIO_BASE); alt_printf("pio_cnt= %x \n", pio_cnt); // still pio_cnt=1 !!!! I configured my PIO as (Input, Synchronous Falling Edge capture, Enable bit-clearing for edge capture register, Generate IRQ with edge trigger) using SOPC builder 10.1. Your advice is highly appreciated. Thank you in advance. Skw