I have been reading the list for some time now and finally have begun implementation 
of RTLinux, so now I have a question.

I am doing servo control with Servo-to-go board which generates an interrupt (irq 5).  
I have the interrupt service routine working fine.  It executes about 25us after the 
interrupt line goes low (pt A to pt B). On a scope it looks something like this:
                             A
IRQ5       —-------------|                            |------------------------
                             |                            |
                             |______________|

Digital out                                                 B
turned on at                                              |--------------------|
start of isr then                                          |    15us        |
off at end —------------------------------------------------|     isr            
|---------------------------------------

My intent is to use the isr to only collect the encoder and analog input data from the 
STG board, not to do any pid or trajectory computations.  Those two things I want to 
do right after the isr in a PID task but not during the isr.  I am assuming it would 
be bad form to do so. Since interrupts are disabled the isr should be kept as short as 
possible.  BTW comments on my assumptions are welcome.

My questoin is this, what is the best way to cause the PID task to execute right after 
the isr has completed? 

I currently have the PID task initialized in the isr modules init code.  This sets it 
up and puts it into a wait condition.  Then at the end of the isr I issue a 
rt_task_wakeup.  The PID task executes and at the end of it's code I issue a 
rt_task_suspend.  The sequence starts all over again the next time the isr runs (1 
khz).

Is there a better way to do this?  A faster way to do this?  I don't want the PID task 
running in a periodic fashion, but instead immediately after the isr.

Any help or comments are appreciated

Thanks,

Garth Gaddy
[EMAIL PROTECTED] 

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