Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
modular-motion-head
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jake Read
modular-motion-head
Commits
75ebaa6c
Commit
75ebaa6c
authored
3 years ago
by
Jake Read
Browse files
Options
Downloads
Patches
Plain Diff
new bus head for easy delimit
parent
233581e0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
firmware/motion-head/src/main.cpp
+15
-14
15 additions, 14 deletions
firmware/motion-head/src/main.cpp
firmware/motion-head/src/osape-d51
+1
-1
1 addition, 1 deletion
firmware/motion-head/src/osape-d51
with
16 additions
and
15 deletions
firmware/motion-head/src/main.cpp
+
15
−
14
View file @
75ebaa6c
...
@@ -203,9 +203,6 @@ void setup() {
...
@@ -203,9 +203,6 @@ void setup() {
DEBUG2PIN_SETUP
;
DEBUG2PIN_SETUP
;
DEBUG3PIN_SETUP
;
DEBUG3PIN_SETUP
;
DEBUG4PIN_SETUP
;
DEBUG4PIN_SETUP
;
// l i g h t s
ERRLIGHT_ON
;
CLKLIGHT_ON
;
// osap
// osap
osapSetup
();
osapSetup
();
// ports
// ports
...
@@ -231,7 +228,7 @@ void setup() {
...
@@ -231,7 +228,7 @@ void setup() {
smoothieRoll
->
init
(
20000
);
smoothieRoll
->
init
(
20000
);
// 25kHz base (40us period) or
// 25kHz base (40us period) or
// 20kHz base (50us period)
// 20kHz base (50us period)
d51ClockBoss
->
start_ticker_a
(
10
0
);
d51ClockBoss
->
start_ticker_a
(
5
0
);
}
}
void
loop
()
{
void
loop
()
{
...
@@ -242,7 +239,7 @@ void loop() {
...
@@ -242,7 +239,7 @@ void loop() {
}
// end loop
}
// end loop
// runs on period defined by timer_a setup:
// runs on period defined by timer_a setup:
volatile
uint
16
_t
timeTick
=
0
;
volatile
uint
32
_t
timeTick
=
0
;
volatile
uint64_t
timeBlink
=
0
;
volatile
uint64_t
timeBlink
=
0
;
uint16_t
blinkTime
=
1000
;
uint16_t
blinkTime
=
1000
;
...
@@ -252,22 +249,17 @@ void TC0_Handler(void){
...
@@ -252,22 +249,17 @@ void TC0_Handler(void){
// runs at period established above...
// runs at period established above...
TC0
->
COUNT32
.
INTFLAG
.
bit
.
MC0
=
1
;
TC0
->
COUNT32
.
INTFLAG
.
bit
.
MC0
=
1
;
TC0
->
COUNT32
.
INTFLAG
.
bit
.
MC1
=
1
;
TC0
->
COUNT32
.
INTFLAG
.
bit
.
MC1
=
1
;
DEBUG1PIN_TOGGLE
;
DEBUG1PIN_HI
;
timeTick
++
;
timeBlink
++
;
if
(
timeBlink
>
blinkTime
){
//DEBUG1PIN_TOGGLE;
CLKLIGHT_TOGGLE
;
sysErrLightCheck
();
timeBlink
=
0
;
}
// do bus action first: want downstream clocks to be deterministic-ish
// do bus action first: want downstream clocks to be deterministic-ish
ucBusHead_timerISR
();
ucBusHead_timerISR
();
// do step tick
// do step tick
smoothieRoll
->
step_tick
();
smoothieRoll
->
step_tick
();
// every n ticks, ship position?
// every n ticks, ship position?
// each of these ticks drops 10 data bytes, so if we have 17 byte packet, can do every 2nd packet
// each of these ticks drops 10 data bytes, so if we have 17 byte packet, can do every 2nd packet
// which would occupy the full bus - notgood - or we can do every 3rd... I'll pick every 4th.
// which would occupy the full bus - notgood - or we can do every 3rd... I'll pick every 4th.
timeTick
++
;
if
(
timeTick
>
3
){
if
(
timeTick
>
3
){
DEBUG2PIN_HI
;
DEBUG2PIN_HI
;
timeTick
=
0
;
timeTick
=
0
;
...
@@ -287,4 +279,13 @@ void TC0_Handler(void){
...
@@ -287,4 +279,13 @@ void TC0_Handler(void){
ucBusHead_transmitA
(
motion_packet
,
17
);
ucBusHead_transmitA
(
motion_packet
,
17
);
DEBUG2PIN_LO
;
DEBUG2PIN_LO
;
}
}
// do blinking, lol
timeBlink
++
;
if
(
timeBlink
>
blinkTime
){
CLKLIGHT_TOGGLE
;
sysErrLightCheck
();
timeBlink
=
0
;
}
DEBUG1PIN_LO
;
}
}
This diff is collapsed.
Click to expand it.
osape-d51
@
2694d0c9
Compare
0beaf064
...
2694d0c9
Subproject commit
0beaf064563e5773f2979d09ad40cefd786ca383
Subproject commit
2694d0c983f0da1679cceb31b41d79e128a2b81d
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment