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: [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/