Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Interrupt problem

Hi,

I would like to receive interrupts with pushbuttons in uclinux with MMU as I have done before with uClinux without MMU.

The problem that I have is that my uclinux doesn't detect interrupts, and I don't know which is the problem. After booting the system I can see in the folder /proc/interrupt the interrupt that I have asked, besides I can see the number of interrupts that the system has received and is 0 aulthought I have pressed so many times pushbuttons.

I'm very confused and something I have do wrong, I would appreciate any help.

Thanks a lot.

PD:I know that there are more posts about this theme but I haven't found the solution.

Component of custom_fpga.h
# define IKEY_COMPONENT_TYPE altera_avalon_pio# define IKEY_COMPONENT_NAME iKEY# define IKEY_BASE 0x8001250# define IKEY_SPAN 16# define IKEY_END 0x800125f# define IKEY_IRQ 3# define IKEY_DO_TEST_BENCH_WIRING 1# define IKEY_DRIVEN_SIM_VALUE 0x0# define IKEY_HAS_TRI 0# define IKEY_HAS_OUT 0# define IKEY_HAS_IN 1# define IKEY_CAPTURE 1# define IKEY_BIT_CLEARING_EDGE_REGISTER 0# define IKEY_BIT_MODIFYING_OUTPUT_REGISTER 0# define IKEY_DATA_WIDTH 3# define IKEY_RESET_VALUE 0x0# define IKEY_EDGE_TYPE "RISING"# define IKEY_IRQ_TYPE "EDGE"# define IKEY_FREQ 100000000
Code of linux with MMU- I don't share interrupts


    if(request_irq(dev->irq, pulsador_interrupt, IRQF_DISABLED, "Pulsadors", NULL)){
        printk("Impossible de registrar aquesta interrupció\n");
    return -1;
    }

static irqreturn_t pulsador_interrupt(int irq, void *dev){
    printk("Interrupció d'entrada\n");
return IRQ_HANDLED;
}
Thanks a lot

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    I have solutioned the problem of the last post, the component was wrong sorry.

    The problem that I meet know is that my irq enters while the signal is in high level(During 20 ms) and I only want to notice the falling edge of it.I haved configured request_irq with flags:

    --- Quote Start ---

    IRQF_DISABLED | IRQF_TRIGGER_FALLING

    --- Quote End ---

    , I also find the command :

    --- Quote Start ---

    set_irq_type

    --- Quote End ---

    to force the trigger.

    But It doesn't go as I want, it always enters during high level.

    Thanks for help