PRUCTL(1) General Commands Manual (armv7) PRUCTL(1)

NAME

pructlControl utility for tipru(4)

SYNOPSIS

pructl [-n core -t state]

pructl [-r]

pructl [-n core [-d infile -i infile -s infile]]

DESCRIPTION

The pructl utility allows userspace interaction with the tipru(4) driver via its character device file. pructl reads infiles and writes them back to the specified tipru(4)-controlled memory spaces. pructl also controls PRU execution state and allows for device reset.
The options are as follows:
-n num
Specify core number. Valid options are '0' and '1' for PRU cores 0 and 1 respectively.
-t runstate
Specify run state. Valid options are '1' and '0' for enabling/disabling PRU execution respectively.
-r
Reset all PRU cores. Zeroes data/instruction/shared memory, halts execution, and resets program counters.
-d infile
Write infile's contents to the data memory space of the PRU core specified with -n.
-i infile
Write infile's contents to the instruction memory space of the PRU core specified with -n.
-s infile
Write infile's contents to the shared memory space.

FILES

/dev/tipru
Character device for accessing PRU instruction/data space and controlling chip.

EXIT STATUS

The pructl utility exits 0 on success, and >0 if an error occurs.

EXAMPLES

Write file machcode's contents to instruction space of PRU 1:
$ pructl -n 1 -i machcode
Halt execution on PRU 0:
$ pructl -n 0 -t 0

SEE ALSO

tipru(4)

HISTORY

The pructl utility will hopefully soon appear in OpenBSD 6.0.

AUTHORS

The pructl utility was written by Ian Sutton <ian@kremlin.cc>.
July 3, 2016 OpenBSD 6.0