Multiple interrupts when pressing a button.
Posted: Fri Nov 13, 2015 11:25 am
Hi,
I am getting multiple interrupts when I press a button. I don't have de-bouncing implemented. Is this usually a problem if I don't have de-bouncing logic?
I am using an ARM9TDMI S3C2440 Samsung IC. My interrupt handling mechanism is as follows:
The handle_irq is a 'C' function. In it I have the following steps.
The above code first masks the interrupt. Then it jumps to the particular interrupt handler. Next it clears the source pending interrupt and clears the interrupt pending flag. After this it unmasks the particular interrupt.
Am I on the right track?
I am getting multiple interrupts when I press a button. I don't have de-bouncing implemented. Is this usually a problem if I don't have de-bouncing logic?
I am using an ARM9TDMI S3C2440 Samsung IC. My interrupt handling mechanism is as follows:
Code: Select all
.globl do_handle_irq
do_handle_irq:
sub lr,lr,#4
stmfd sp!, {r0-r12,lr} @Save r0-r12 and lr.
bl handle_irq
ldmfd sp!, {r0-r12,pc}^
Code: Select all
offset = readreg32(INTOFFSET_REG(INT_BA));
mask_interrupt(INT_BA,BIT(offset));
interrupt_handler_jmp_table[offset]();
clear_interrupt_source_pending(INT_BA,BIT(offset));
clear_interrupt_pending(INT_BA,BIT(offset));
unmask_interrupt(INT_BA,BIT(offset));
Am I on the right track?