[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm-kernel
Subject:    Re: pending interrupts
From:       Hinko Kocevar <hinko.kocevar () iskramedical ! si>
Date:       2004-09-14 16:32:06
Message-ID: 41471D06.3080304 () iskramedical ! si
[Download RAW message or body]

Nicolas Pitre wrote:
> 
> You must realize that, even if the interrupt handling code doesn't queue 
> pending interrupts for later processing, there is always the chance that 
> the RTG has moved 2 cycles away (suppose that you're rotating it 
> madly) by the time the interrupt is actually 
> serviced.  This would have the effect of sampling the opposite direction 
> movement.
> 

Thats exactly what happens - values returned by driver alternate to 
positive and negative direction resulting in approximate standstil...

> If you monitor only one pin (one GPIO to generate interrupts) then you 
> have a similar issue to the above, and you're also decreasing your 
> resolution by half.
> 

Using mechanical incrementing RPG with 24 positions solves the problem 
as interrupt occurs every 360deg/24 while with optical it happened 
360deg/120 angle degree. I get all 24 positions for each turnaround.

> Your only chance of ever making it %100 reliable is then to hook some 
> special code in the low level IRQ path (i.e. the assembly portion of it) 
> to bypass everything else and hope that no other interrupt handler or 
> anything is masking out interrupts for too long.
> 

My assembly is weak, real weak and with all those peripherials hooked to 
gpios acting as interrupt sources I probably wouldn't benefit from it 
anyway.

> Or use a PXA270 which has a RTG interface in hardware.
> 

Future will tell.

-- 
hinko <dot> kocevar <at> iskramedical <dot> si
Hinko Kocevar, developer
Iskra Medical d.o.o., Stegne 23, 1k LJ, SLO-EU

	"Aì rén"	|	[Analects XII:22]

-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:       http://www.arm.linux.org.uk/armlinux/mlfaq.php
Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic