Browse files

Merge pull request #394 from russellgower/bbb_eqep

Added arm335x eQEP enconder support
  • Loading branch information...
zultron committed Dec 8, 2014
2 parents eb43ee0 + 923d45c commit e7fad1edbce8a19378bc2a09e3f4d49b70828a7a
Showing with 647 additions and 0 deletions.
  1. +1 −0 docs/src/Submakefile
  2. +51 −0 docs/src/drivers/hal_arm335xQEP.txt
  3. +5 −0 src/Makefile
  4. +389 −0 src/hal/drivers/hal_arm335xQEP.c
  5. +201 −0 src/hal/drivers/hal_arm335xQEP.h
@@ -65,6 +65,7 @@ DOC_SRCS_EN := \
drivers/pluto_p.txt \
drivers/servo_to_go.txt \
drivers/shuttlexpress.txt \
drivers/hal_arm335xQEP.txt \
examples/gcode.txt \
examples/gs2_example.txt \
examples/mpg.txt \
@@ -0,0 +1,51 @@
= arm355x eQEP encoder driver
[[cha:arm355xQEP-driver]] (((arm335x eQEP driver)))
hal_arm335xQEP is a driver for the 3 hardware quadrature decoders
built into the Beaglebone.
loadrt hal_arm335xQEP encoders=eQEP{0-2}[,eQEP{0-2}][,eQEP{0-2}]
In the following Pins and Parameters, <name> is one of eQEP0, eQEP1 or eQEP2 and referes
to the names of the hardware instance specified on the loadrt line.
== Pins
* '(s32) <name>.counts' - Position in encoder counts.
* '(bit) <name>.index-enable' - When true, counts and position are reset to
zero on the next rising edge of the QEPI signal. At the same time,
index-enable is reset to zero to indicate that the rising edge has
* '(float) <name>.position' - Position in scaled units (see position-scale).
* '(float) <name>.position-interpolated' - Position in scaled units,
interpolated between encoder countsd.
* '(float) <name>.position-scale' - Scale factor in counts per length unit.
For example of position-scale is 500, then 1000 counts of the encoder will
be reported as a position of 2.0 units.
* '(s32) <name>.rawcounts' - The raw counts from the hardware register,
unaffected by reset or index events.
* '(bin) <name>.reset' - When true, counts and position are reset to zero.
* '(float) <name>.velocity' - Velocity in scaled units per second, When the
magnitude of the true velocity is below the min-speed-estimate, the
velocity output is 0.
== Parameters
* '(float) <name>.min-speed-estimate' - Determine the minimum true velocity
magnitude at which velocity will be estimated as non zero and
position-interpolated will be interpolated. The units of min-speed-estimate
are the same as the units of velocity. Setting this parameter too low will
cause it to take a lomg time for velocity to go to 0 after the encoder
pulses have stopped arriving.
== Functions
* '(funct) eqep.update' - Reads all hardware counters and updates calculated
values, for all decoders.
@@ -1223,6 +1223,10 @@ hal_bb_gpio-objs := hal/drivers/hal_bb_gpio.o
obj-$(CONFIG_PEPPER) += pepper.o
pepper-objs := hal/components/pepper.o $(MATHSTUB)
obj-m += hal_arm335xQEP.o
hal_arm335xQEP-objs := hal/drivers/hal_arm335xQEP.o $(MATHSTUB)
ifeq ($(BUILD_SYS),user-dso)
@@ -1533,6 +1537,7 @@ $(RTLIBDIR)/hal_prudebug$(MODULE_EXT): $(addprefix $(OBJDIR)/,$(hal_prudebug-obj
$(RTLIBDIR)/hal_gpio$(MODULE_EXT): $(addprefix $(OBJDIR)/,$(hal_gpio-objs))
$(RTLIBDIR)/hal_bb_gpio$(MODULE_EXT): $(addprefix $(OBJDIR)/,$(hal_bb_gpio-objs))
$(RTLIBDIR)/pepper$(MODULE_EXT): $(addprefix $(OBJDIR)/,$(pepper-objs))
$(RTLIBDIR)/hal_arm335xQEP$(MODULE_EXT): $(addprefix $(OBJDIR)/,$(hal_arm335xQEP-objs))
Oops, something went wrong.

0 comments on commit e7fad1e

Please sign in to comment.