aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/ti/am335x/am335x_dmtreg.h
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2017-01-27 04:08:24 +0000
committerIan Lepore <ian@FreeBSD.org>2017-01-27 04:08:24 +0000
commit28b3a4a659bad0c5c2cf952e049a15ddb91f4a75 (patch)
tree709fde106fe4a382110041bf904113df1690a2d5 /sys/arm/ti/am335x/am335x_dmtreg.h
parentbdb691d4497527923c084f9c9c35c0b8c1bf2196 (diff)
Configure the timer capture pin to input mode in the timer control
register, in addition to configuring it as input with the pinmux driver. There was a control register bit commented as "no desc in datasheet". A later revision of the manual reveals the bit to be an input/output control for the timer pin. In addition to configuring capture or pulse mode, you apparently have to separately configure the pin direction in the timer control register. Before this change, the timer block was apparently driving a signal onto a pad configured by pinmux as input. Capture mode still accidentally worked for me during testing because I was using a very strong signal source that just out-muscled the weaker drive from the misconfigured pin.
Notes
Notes: svn path=/head/; revision=312859
Diffstat (limited to 'sys/arm/ti/am335x/am335x_dmtreg.h')
-rw-r--r--sys/arm/ti/am335x/am335x_dmtreg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm/ti/am335x/am335x_dmtreg.h b/sys/arm/ti/am335x/am335x_dmtreg.h
index 8a9d63753832..f2ef54ddb917 100644
--- a/sys/arm/ti/am335x/am335x_dmtreg.h
+++ b/sys/arm/ti/am335x/am335x_dmtreg.h
@@ -62,7 +62,7 @@
#define DMT_TCLR_TRGMODE_BOTH (2 << 10) /* Trigger on match + ovflow */
#define DMT_TCLR_PWM_PTOGGLE (1 << 12) /* PWM toggles */
#define DMT_TCLR_CAP_MODE_2ND (1 << 13) /* Capture second event mode */
-#define DMT_TCLR_GPO_CFG (1 << 14) /* (no descr in datasheet) */
+#define DMT_TCLR_GPO_CFG (1 << 14) /* Tmr pin conf, 0=out, 1=in */
#define DMT_TCRR 0x3C /* Counter Register */
#define DMT_TLDR 0x40 /* Load Reg */
#define DMT_TTGR 0x44 /* Trigger Reg */