Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.0.x] UltiMachine Archim2 #8190

Merged
merged 14 commits into from
Nov 3, 2017
Merged

Conversation

teemuatlut
Copy link
Member

@teemuatlut teemuatlut commented Oct 31, 2017

Support for UltiMachine Archim2.0 board with 32bit SAM3X8E (Due) MCU and five TMC2130 stepper drivers.
Makes use of the Due HAL but requires a customized Arduino Due core, made by UltiMachine.
Install instructions for Arduino Archim addons.

Initially tested by UltiMachine.

Currently compiling is broken due to a recent commit on the Due HAL.

Tagging @tonokip

@thinkyhead thinkyhead changed the title UltiMachine Archim2 [2.0.x] UltiMachine Archim2 Oct 31, 2017
@thinkyhead thinkyhead added C: Boards/Pins T: HAL & APIs Topic related to the HAL and internal APIs. labels Oct 31, 2017
@@ -181,7 +181,7 @@
st.power_down_delay(128); // ~2s until driver lowers to hold current
st.hysterisis_start(0); // HSTRT = 1
st.hysterisis_low(1); // HEND = -2
st.diag1_active_high(1); // For sensorless homing
st.diag1_active_high(0); // For sensorless homing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes a bug?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was advised by UltiMachine because the diag pins are connected. I didn't ask further questions and for sensorless homing it doesn't really matter as the triggering logic can be inverted in the configuration files.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will this affect boards other than Archim?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user will need to change the _ENDSTOP_INVERTING setting. No change is needed if sensorless homing isn't used.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems sensible!

@thinkyhead
Copy link
Member

Should compile now. const was removed from the isrtab declaration.

@thinkyhead
Copy link
Member

requires a customized Arduino Due core, made by UltiMachine.

Would you mind adding a comment at the top of the ARCHIM pins file explaining this in brief and giving a link to the relevant web page? Thanks!

@thinkyhead
Copy link
Member

TMC2130 + 32-bit is the froshizzle!

@teemuatlut
Copy link
Member Author

teemuatlut commented Oct 31, 2017

Would you mind adding a comment at the top of the ARCHIM pins file explaining this in brief and giving a link to the relevant web page? Thanks!

Sure thing. I also pitched UltiMachine the idea to create a README.md file into the Archim2 folder and there detail any additional instructions.

@teemuatlut
Copy link
Member Author

teemuatlut commented Oct 31, 2017

The isrtab error is cleared now but now it fails at MarlinSerial_Due.cpp because for
Archim SERIAL_PORT is -1 and that isn't handled. The error itself is about a missing definition for HWUART and I don't really have the knowledge to properly expand that part.

@thinkyhead
Copy link
Member

The -1 SERIAL_PORT option should be added pretty soon. Assuming it means the same thing for Archim as it does for #8148. @tcm0116 should be able to confirm.

@thinkyhead
Copy link
Member

thinkyhead commented Nov 1, 2017

Pro-tip: Only a single back-tick is needed to format text in code style.
Three backticks plus an optional file suffix (```cpp) on a line by itself for multi-line code:

# Comment
int a = 5;

Diff with ```diff example…

  # Comment
- int a = 5;
+ int a = 4;

@teemuatlut
Copy link
Member Author

The -1 SERIAL_PORT option should be added pretty soon. Assuming it means the same thing for Archim as it does for #8148. @tcm0116 should be able to confirm.

The board uses the native serialUSB for communication so I'm not sure if there's any need to even compile the whole MarlinSerial class. I don't think this problem here is too closely related to having multiple serial ports in use.

@@ -54,7 +54,6 @@
#endif

#if ENABLED(HAVE_TMC2130)
#include <SPI.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already included by TMC2130Stepper.h?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Also the Archim2 uses software SPI and the library handles it according to flags set by the core.

@thinkyhead
Copy link
Member

thinkyhead commented Nov 2, 2017

Is there a specific reason why USE_WATCHDOG is disabled on the config?

@teemuatlut
Copy link
Member Author

Is there a specific reason why USE_WATCHDOG is disabled on the config?

"Also you will need to disable the watchdog in Configuration.h for now as the Archim core disables it. I'll need to do an updated version to fix this similar to newer Arduino Due versions. "
-UltiMachine


#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#define BEEPER 23 // D24 PA15_CTS1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BEEPER is now BEEPER_PIN

#define TEMP_1_PIN 9 // D9 PB18 THERM AN2
#define TEMP_2_PIN 8 // D8 PB17 THERM AN4
#define TEMP_BED_PIN 11 // D11 PB20 THERM AN3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor, but these four are also different from v1 and could be marked with * for completeness.

#define HEATER_0_PIN 6 // D6 PC24 FET_PWM3
#define HEATER_1_PIN 7 // D7 PC23 FET_PWM4
#define HEATER_2_PIN 8 // D8 PC22 FET_PWM5
#define HEATER_BED_PIN 9 // D9 PC21 BED_PWM
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could follow the convention set forth in pins_RAMPS.h where we can swap around the functions based on user selection of extruders, fans, and bed, assigning EEF, EEB, EFB, etc.

@thinkyhead thinkyhead merged commit 70be4d2 into MarlinFirmware:bugfix-2.0.x Nov 3, 2017
@tonokip
Copy link
Contributor

tonokip commented Nov 3, 2017

Regarding the watchdog, it can be re-enabled. It used to be disabled in the Archim core/variant but that is not the case anymore.

#define LCD_PINS_D7 34 // D34 PC2_PWML0

#define SD_DETECT_PIN 2 // D2 PB25_TIOA0
#define SDSS 87 // D87 PA29 CS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this merged already...but I was only able to get it to build if I moved the define for the SDSS pin out of the LCD section (even if I tried configuring an LCD when building.) Looking at other pins files it appears this is now always defined on other boards and no longer conditional.

@teemuatlut teemuatlut deleted the Archim2 branch November 23, 2017 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Boards/Pins T: HAL & APIs Topic related to the HAL and internal APIs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants