Commit 15d818af authored by Maciej Lipinski's avatar Maciej Lipinski

doc update: add sudo and update text on irq_demo

parent 5982b79c
...@@ -558,43 +558,43 @@ Example uses of the tool follow: ...@@ -558,43 +558,43 @@ Example uses of the tool follow:
@example @example
# Pulse channel 4 for 0.1 seconds now # Pulse channel 4 for 0.1 seconds now
wr-dio-cmd /dev/fmc-dio-1:0 pulse 4 .1 now sudo wr-dio-cmd /dev/fmc-dio-1:0 pulse 4 .1 now
# Pulse for 10 microseconds in the middle of the next second # Pulse for 10 microseconds in the middle of the next second
wr-dio-cmd /dev/fmc-dio-1:0 pulse 4 .00001 +1.5 sudo wr-dio-cmd /dev/fmc-dio-1:0 pulse 4 .00001 +1.5
# Pulse for 1ms at 17:00 today # Pulse for 1ms at 17:00 today
wr-dio-cmd /dev/fmc-dio-1:0 pulse 4 .001 $(date +%s --date 17:00) sudo wr-dio-cmd /dev/fmc-dio-1:0 pulse 4 .001 $(date +%s --date 17:00)
# Get timestamps for the output events above # Get timestamps for the output events above
wr-dio-cmd /dev/fmc-dio-1:0 stamp 4 sudo wr-dio-cmd /dev/fmc-dio-1:0 stamp 4
# Make a train of 5 pulses, 0.5ms wide, every ms at next second # Make a train of 5 pulses, 0.5ms wide, every ms at next second
wr-dio-cmd /dev/fmc-dio-1:0 pulse 4 0.0005 +1 .001 5 sudo wr-dio-cmd /dev/fmc-dio-1:0 pulse 4 0.0005 +1 .001 5
# Configure channel 0 as input with termination, 1 as input, 4 as low # Configure channel 0 as input with termination, 1 as input, 4 as low
wr-dio-cmd /dev/fmc-dio-1:0 mode Ii--0 sudo wr-dio-cmd /dev/fmc-dio-1:0 mode Ii--0
# Generate interrupt now # Generate interrupt now
wr-dio-cmd /dev/fmc-dio-1:0 irq now sudo wr-dio-cmd /dev/fmc-dio-1:0 irq now
# Generate a train of 100 interrupts every 10 ms starting at the next second # Generate a train of 100 interrupts every 10 ms starting at the next second
wr-dio-cmd /dev/fmc-dio-1:0 irq +1 .01 100 sudo wr-dio-cmd /dev/fmc-dio-1:0 irq +1 .01 100
# Make a train of indefinite pulses, 1ms wide every 5ms # Make a train of indefinite pulses, 1ms wide every 5ms
wr-dio-cmd /dev/fmc-dio-1:0 pulse 1 0.001 now 0.005 -1 sudo wr-dio-cmd /dev/fmc-dio-1:0 pulse 1 0.001 now 0.005 -1
# Stop the previous pulse train # Stop the previous pulse train
wr-dio-cmd /dev/fmc-dio-1:0 pulse 1 0.001 now 0.005 0 sudo wr-dio-cmd /dev/fmc-dio-1:0 pulse 1 0.001 now 0.005 0
# Update pulse width in channel 1 to 10ms # Update pulse width in channel 1 to 10ms
wr-dio-cmd /dev/fmc-dio-1:0 update_width 1 0.01 sudo wr-dio-cmd /dev/fmc-dio-1:0 update_width 1 0.01
# Disable interrupts in channel 0 # Disable interrupts in channel 0
wr-dio-cmd /dev/fmc-dio-1:0 mask_irq 0 y sudo wr-dio-cmd /dev/fmc-dio-1:0 mask_irq 0 y
# Enable interrupts in channel 2 # Enable interrupts in channel 2
wr-dio-cmd /dev/fmc-dio-1:0 mask_irq 2 Y sudo wr-dio-cmd /dev/fmc-dio-1:0 mask_irq 2 Y
@end example @end example
...@@ -796,24 +796,24 @@ with a delay of 1ms. The input events in this case are from a @i{pulse-per-secon ...@@ -796,24 +796,24 @@ with a delay of 1ms. The input events in this case are from a @i{pulse-per-secon
@smallexample @smallexample
tornado.root# /tmp/wr-dio-agent wr0 /dev/fmc-dio-1:0 & tornado.root# /tmp/wr-dio-agent wr0 /dev/fmc-dio-1:0 &
spusa.root# wr-dio-ruler wr1 /dev/fmc-dio-1:0 IN4 L3+.001 R4+.001 R2+.001 spusa.root# sudo wr-dio-ruler wr1 /dev/fmc-dio-1:0 IN4 L3+.001 R4+.001 R2+.001
wr-dio-ruler: configured for local channel 3, delay 0.001000000 wr-dio-ruler: configured for local channel 3, delay 0.001000000
wr-dio-ruler: configured for remote channel 4, delay 0.001000000 wr-dio-ruler: configured for remote channel 4, delay 0.001000000
wr-dio-ruler: configured for remote channel 2, delay 0.001000000 wr-dio-ruler: configured for remote channel 2, delay 0.001000000
[... wait a few seconds ...] [... wait a few seconds ...]
spusa.root# wr-dio-cmd /dev/fmc-dio-1:0 stamp 3 spusa.root# sudo wr-dio-cmd /dev/fmc-dio-1:0 stamp 3
ch 3, 385.001000000 ch 3, 385.001000000
ch 3, 386.001000000 ch 3, 386.001000000
ch 3, 387.001000000 ch 3, 387.001000000
ch 3, 388.001000000 ch 3, 388.001000000
tornado.root# wr-dio-cmd /dev/fmc-dio-1:0 stamp 2 tornado.root# sudo wr-dio-cmd /dev/fmc-dio-1:0 stamp 2
ch 2, 385.001000000 ch 2, 385.001000000
ch 2, 386.001000000 ch 2, 386.001000000
ch 2, 387.001000000 ch 2, 387.001000000
ch 2, 388.001000000 ch 2, 388.001000000
tornado.root# wr-dio-cmd /dev/fmc-dio-1:0 stamp 4 tornado.root# sudo wr-dio-cmd /dev/fmc-dio-1:0 stamp 4
ch 4, 385.001000000 ch 4, 385.001000000
ch 4, 386.001000000 ch 4, 386.001000000
ch 4, 387.001000000 ch 4, 387.001000000
...@@ -824,8 +824,7 @@ with a delay of 1ms. The input events in this case are from a @i{pulse-per-secon ...@@ -824,8 +824,7 @@ with a delay of 1ms. The input events in this case are from a @i{pulse-per-secon
@node Interrupt Demo @node Interrupt Demo
@chapter Interrupt Demo @chapter Interrupt Demo
The interrupt demo software can be found in the root directoy of the wr-starting-kit The interrupt demo software can be found in the @code{sw/irq-demo} directoy.
repository.
This demo sofware disables the interrupts of all channel except the new one, only This demo sofware disables the interrupts of all channel except the new one, only
dedicated to interrupts. dedicated to interrupts.
By default, it setups the interrupt with 100 milliseconds between them. By default, it setups the interrupt with 100 milliseconds between them.
...@@ -838,7 +837,7 @@ This is the general syntax of the command: ...@@ -838,7 +837,7 @@ This is the general syntax of the command:
@table @code @table @code
@item demo-irq <dio-device> [<period in ns>] @item irq-demo <dio-device> [<period in ns>]
@end table @end table
...@@ -846,10 +845,10 @@ Example uses of the tool follow: ...@@ -846,10 +845,10 @@ Example uses of the tool follow:
@example @example
# Generate one interrupt each 100 ms # Generate one interrupt each 100 ms
demo-irq /dev/fmc-dio-1:0 sudo irq-demo /dev/fmc-dio-1:0
# Generate one interrupt each 10 ms # Generate one interrupt each 10 ms
demo-irq /dev/fmc-dio-1:0 10000000 sudo irq-demo /dev/fmc-dio-1:0 10000000
@end example @end example
@c ########################################################################## @c ##########################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment