Hello,

In a real time module using the parallel port to measure interrupt 
time difference, it seems that the ISR is called twice. I use a 
signal generator at 1Hz to generate an interrupt at pin10, nAck of 
the SPP. Using the code

unsigned int spp_isr( unsigned int irq_number, struct pt_regs *p )
    {
    DPRINTK( "Starting spp_isr\n" );
               
    spp_byte = inb( RT_MCM_SPP_BASE+RT_MCM_SPP_STA );
    spp_irqs++;
    spp_irqs %= FRAME_LENGTH;
    DPRINTK( "spp_irqs = %d\n", (int)(spp_irqs) );

    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;
    DPRINTK( "spp_dT  = %d\n", spp_dT  );
        
    rtl_hard_enable_irq( RT_MCM_SPP_IRQ );
       
    DPRINTK( "Leaving spp_isr\n\n" );
    return 0;
    }

I get periodically at 1Hz with "cat /proc/kmsg":

<4>
<4>Starting rt_mcm_spp_isr
<4>rt_mcm_spp_irqs = 2
<4>rt_mcm_spp_dT  = 1409260352
<4>Starting rt_mcm_spp_isr
<4>rt_mcm_spp_irqs = 3
<4>rt_mcm_spp_dT  = 52064
<4>Leaving rt_mcm_spp_isr
<4>
<4>Leaving rt_mcm_spp_isr
<4>

Is it necessary to set something on the SPP in the ISR?
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: [EMAIL PROTECTED]

                  Ceterum censeo MIRCOSOFTem esse delendam.
-- [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/

Reply via email to