From 03008574cb27c00649d1aa87469ec1bc8fb6f424 Mon Sep 17 00:00:00 2001
From: Jake Read <jake.read@cba.mit.edu>
Date: Thu, 18 Nov 2021 16:31:50 -0500
Subject: [PATCH] ucbus settings seem OK

---
 firmware/motion-head/src/config.h  | 5 +++++
 firmware/motion-head/src/main.cpp  | 3 ++-
 firmware/motion-head/src/osape-d51 | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/firmware/motion-head/src/config.h b/firmware/motion-head/src/config.h
index facb76c..5afe6ea 100644
--- a/firmware/motion-head/src/config.h
+++ b/firmware/motion-head/src/config.h
@@ -4,11 +4,16 @@
 
 // for the bus: head, or drop? 
 #define UCBUS_IS_HEAD
+// genuine max is 63, drop for speed 
+#define UCBUS_MAX_DROPS 32 
 //#define UCBUS_IS_DROP
 // and D21 or D51?
 #define UCBUS_IS_D51
 //#define UCBUS_IS_D21 
 
+// 3, 2, or 1 MBaud 
+#define UCBUS_BAUD 2 
+
 // if you're using the 'module board' https://gitlab.cba.mit.edu/jakeread/ucbus-module
 // the first (og) revision has an SMT header, and some of the RS485 pins are varied, 
 // set this flag. otherwise, if you have thru-hole JTAG header, comment it out 
diff --git a/firmware/motion-head/src/main.cpp b/firmware/motion-head/src/main.cpp
index 8ec6413..03a3fbe 100644
--- a/firmware/motion-head/src/main.cpp
+++ b/firmware/motion-head/src/main.cpp
@@ -228,8 +228,9 @@ void setup() {
   smoothieRoll->init(20000);
   // 25kHz base (40us period) or 
   // 20kHz base (50us period)
+  // 10kHz base (100us period) 
   // 5kHz base (200us period)
-  d51ClockBoss->start_ticker_a(200); 
+  d51ClockBoss->start_ticker_a(100); 
 }
 
 void loop() {
diff --git a/firmware/motion-head/src/osape-d51 b/firmware/motion-head/src/osape-d51
index 0ae34dd..2306433 160000
--- a/firmware/motion-head/src/osape-d51
+++ b/firmware/motion-head/src/osape-d51
@@ -1 +1 @@
-Subproject commit 0ae34dd7e5bca95f22725a970c2c2eb69e55ddb2
+Subproject commit 23064339e200c3819af8bc55988b57d3eaa28a2e
-- 
GitLab