[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rtl] parallel port ISR two times?
Is this problem only occurring at the very beginning of your runs? Or
does it repeat itself at random intervals? In other words, if you let
the process run for a minute or so, do you get more than one
mis-trigger?
Could you possibly be calling "rtl_request_irq" more than once in your
init_module?
If the problems persist, try resetting the interrupt in the parallel
port by doing something like:
outb(0x00, PP_SPP_BASE+0x02);
outb(0x10, PP_SPP_BASE+0x02);
immediately before you reenable the interrupts.
If the problem still persists, I would be highly inclined towards
suspecting that either your parallel port is suspect or that you have a
dirty pulse coming in.
-Edgar
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
> --
> Dr. Peter Wurmsdobler
>
> CTM - Centre de Transfert des Microtechniques
> 39, av. de l'Observatoire, BP-1445, 25007 Besancon CEDEX 3
> TELEPHONE: +33 3 81 47 70 20 TELECOPIE: +33 3 81 47 70 21
> E-mail: peter.wurmsdobler@ctm-france.com
>
> Ceterum censeo MIRCOSOFTem esse delendam.
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> ---
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/