Peter Wurmsdobler wrote:
>
> Stuart,
>
> Thanks, I just read the code and it looks nice. Unfortunately,
> I still cannot find he bug in my rt isr, why the isr is called
> twice. Now I tested with debug off and I put the dT in a fifo
> within the real time isr:
>
> hrtime_t spp_now;
> hrtime_t spp_past;
> int spp_dT;
> int spp_dT_past;
> int spp_irqs;
> unsigned int spp_isr( unsigned int irq_number, struct pt_regs *p )
> {
> spp_now = gethrtime();
> spp_dT = (int)(spp_now - spp_past);
> spp_past = spp_now;
> if ( spp_dT < 0 )
> spp_dT = spp_dT_past;
> else
> spp_dT_past = spp_dT;
>
> rtf_put( RSPEED_FIFO, &spp_dT, sizeof(spp_dT) );
>
> rtl_hard_enable_irq( RT_MCM_SPP_IRQ );
>
> return 0;
> }
>
> and in a user space appl I pick them up
>
> int value;
> while ( read( rspeed_fd, &value, sizeof(vlaue) ) > 0 )
> printf("time = %d ns\n", value );
>
> Then I get for 1Hz excitation frequency periodically:
>
> Entering event_fifo_handler
> time = 999894432 ns
> time = 9280 ns
> time = 5952 ns
> time = 6464 ns
> time = 5792 ns
> Leaving event_fifo_handler
>
> What is going on? Do you have an idea?
> peterw
Hi Peter,
It almost looks as if you exit the ISR and the interrupt is still
asserted and so you come straight back into the ISR (I thought this
would only happen with a level triggered interrupt) until the signal
generator removes the interrupt source. Maybe someone else knows how
this can happen with the parallel port ???
Regards, Stuart
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/