Browse Source

[2.0.x] TMC2130 support for LPC platform (#9114)

pull/1/head
teemuatlut 7 years ago
committed by Scott Lahteine
parent
commit
5c69d45f5b
  1. 6
      Marlin/Configuration_adv.h
  2. 2
      Marlin/src/HAL/HAL_LPC1768/HAL.h
  3. 16
      Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp
  4. 2
      Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp
  5. 44
      Marlin/src/HAL/HAL_LPC1768/LPC_SPI.h
  6. 2
      Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp
  7. 2
      Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h
  8. 2
      Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp
  9. 2
      Marlin/src/HAL/HAL_LPC1768/fastio.h
  10. 0
      Marlin/src/HAL/HAL_LPC1768/include/Arduino.h
  11. 2
      Marlin/src/HAL/HAL_LPC1768/main.cpp
  12. 4
      Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h
  13. 4
      Marlin/src/HAL/SPI.h
  14. 6
      Marlin/src/config/default/Configuration_adv.h
  15. 6
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  16. 6
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  17. 6
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  18. 6
      Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
  19. 6
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  20. 6
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  21. 6
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  22. 6
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  23. 6
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  24. 6
      Marlin/src/config/examples/Felix/Configuration_adv.h
  25. 6
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  26. 6
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  27. 6
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  28. 6
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  29. 6
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  30. 6
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  31. 6
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  32. 6
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  33. 6
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  34. 6
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  35. 6
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  36. 6
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  37. 6
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  38. 6
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  39. 6
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  40. 6
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  41. 6
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  42. 6
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  43. 6
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  44. 6
      Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
  45. 6
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  46. 6
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  47. 6
      Marlin/src/config/examples/makibox/Configuration_adv.h
  48. 6
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  49. 6
      Marlin/src/config/examples/wt150/Configuration_adv.h
  50. 6
      Marlin/src/module/stepper_indirection.cpp
  51. 10
      Marlin/src/pins/pins_ARCHIM2.h
  52. 15
      Marlin/src/pins/pins_RAMPS_RE_ARM.h
  53. 2
      frameworks/CMSIS/LPC1768/lib/LiquidCrystal.cpp
  54. 2
      frameworks/CMSIS/LPC1768/lib/Stream.cpp
  55. 1
      platformio.ini

6
Marlin/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

2
Marlin/src/HAL/HAL_LPC1768/HAL.h

@ -56,7 +56,7 @@ extern "C" volatile uint32_t _millis;
#define B01 1
#define B10 2
#include "include/arduino.h"
#include "include/Arduino.h"
#include "pinmapping.h"
#include "fastio.h"

16
Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp

@ -56,6 +56,8 @@
//#include "../../../MarlinConfig.h" //works except in U8g
#include "spi_pins.h"
#include "fastio.h"
#include "LPC_SPI.h"
#include "../SPI.h"
// --------------------------------------------------------------------------
// Public Variables
@ -191,6 +193,20 @@
WRITE(SS_PIN, HIGH);
}
void SPIClass::begin() { spiBegin(); }
uint8_t SPIClass::transfer(uint8_t B) {
return spiTransfer(B);
}
uint16_t SPIClass::transfer16(uint16_t data) {
uint16_t buffer;
buffer = transfer((data>>8) & 0xFF) << 8;
buffer |= transfer(data & 0xFF) && 0xFF;
return buffer;
}
SPIClass SPI;
#else
// hardware SPI

2
Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp

@ -74,7 +74,7 @@
#include "../../inc/MarlinConfig.h"
#include <lpc17xx_pinsel.h>
#include "LPC1768_PWM.h"
#include "arduino.h"
#include "Arduino.h"
#define NUM_ISR_PWMS 20

44
Marlin/src/HAL/HAL_LPC1768/LPC_SPI.h

@ -0,0 +1,44 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#ifdef TARGET_LPC1768
#include <stdint.h>
#define MSBFIRST 0
#define SPI_MODE3 0
class SPISettings {
public:
SPISettings(int a, int b, int c) {};
};
class SPIClass {
public:
void begin();
void beginTransaction(SPISettings foo) {};
void endTransaction() {};
uint8_t transfer(uint8_t data);
uint16_t transfer16(uint16_t data);
};
extern SPIClass SPI;
#endif

2
Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp

@ -39,7 +39,7 @@
#include "../../inc/MarlinConfig.h"
#include <stdint.h>
#include <stdarg.h>
#include "include/arduino.h"
#include "include/Arduino.h"
#include "pinmapping.h"
#include "fastio.h"
#include "SoftwareSerial.h"

2
Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h

@ -33,7 +33,7 @@
#ifndef SOFTWARESERIAL_H
#define SOFTWARESERIAL_H
#include "include/arduino.h"
#include "include/Arduino.h"
#include <stdint.h>
//#include "serial.h"
#include <Stream.h>

2
Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp

@ -19,7 +19,7 @@
#ifdef TARGET_LPC1768
#include "../../inc/MarlinConfig.h"
#include "include/arduino.h"
#include "include/Arduino.h"
#include "pinmapping.h"
//#include "HAL_timers.h"
#include "fastio.h"

2
Marlin/src/HAL/HAL_LPC1768/fastio.h

@ -36,7 +36,7 @@
#define _FASTIO_LPC1768_H
#include <LPC17xx.h>
#include "include/arduino.h"
#include "include/Arduino.h"
#include "pinmapping.h"
bool useable_hardware_PWM(pin_t pin);

0
Marlin/src/HAL/HAL_LPC1768/include/arduino.h → Marlin/src/HAL/HAL_LPC1768/include/Arduino.h

2
Marlin/src/HAL/HAL_LPC1768/main.cpp

@ -30,7 +30,7 @@ extern "C" {
#include "HAL_timers.h"
#include <stdio.h>
#include <stdarg.h>
#include "include/arduino.h"
#include "include/Arduino.h"
#include "serial.h"
#include "LPC1768_PWM.h"

4
Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h

@ -82,8 +82,8 @@ typedef int8_t pin_t;
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
#define CRITICAL_SECTION_END SREG = _sreg;
// On AVR this is in math.h?
#define square(x) ((x)*(x))
#undef sq
#define sq(x) ((x)*(x))
#ifndef strncpy_P
#define strncpy_P(dest, src, num) strncpy((dest), (src), (num))

4
Marlin/src/HAL/SPI.h

@ -79,4 +79,8 @@ void spiSendBlock(uint8_t token, const uint8_t* buf);
/** Begin SPI transaction, set clock, bit order, data mode */
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode);
#ifdef TARGET_LPC1768
#include "HAL_LPC1768/LPC_SPI.h"
#endif
#endif // _SPI_H_

6
Marlin/src/config/default/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Anet/A6/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Anet/A8/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h

@ -1086,6 +1086,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Cartesio/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Felix/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/MakerParts/Configuration_adv.h

@ -1086,6 +1086,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h

@ -1093,6 +1093,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/RigidBot/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/SCARA/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h

@ -1098,6 +1098,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h

@ -1087,6 +1087,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h

@ -1087,6 +1087,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h

@ -1087,6 +1087,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/delta/generic/Configuration_adv.h

@ -1087,6 +1087,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h

@ -1087,6 +1087,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h

@ -1092,6 +1092,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h

@ -1087,6 +1087,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/makibox/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h

@ -1085,6 +1085,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/config/examples/wt150/Configuration_adv.h

@ -1086,6 +1086,12 @@
#define E4_CURRENT 800
#define E4_MICROSTEPS 16
/**
* Use software SPI for TMC2130.
* SW SPI pins are defined the respective pins files.
*/
//#define TMC_USE_SW_SPI
/**
* Use Trinamic's ultra quiet stepping mode.
* When disabled, Marlin will use spreadCycle stepping mode.

6
Marlin/src/module/stepper_indirection.cpp

@ -137,7 +137,11 @@
#include "planner.h"
#include "../core/enum.h"
#define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN)
#if ENABLED(TMC_USE_SW_SPI)
#define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN, TMC_SW_MOSI, TMC_SW_MISO, TMC_SW_SCK)
#else
#define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN)
#endif
// Stepper objects of TMC2130 steppers used
#if ENABLED(X_IS_TMC2130)

10
Marlin/src/pins/pins_ARCHIM2.h

@ -93,6 +93,16 @@
#define E1_CS_PIN 19 // PA10 E2_nCS
#define E1_DIAG_PIN 25 // PD0 E2_DIAG
//
// Software SPI pins for TMC2130 stepper drivers.
// Required for the Archim2 board.
//
#if ENABLED(TMC_USE_SW_SPI)
#define TMC_SW_MOSI 28 // PD3
#define TMC_SW_MISO 26 // PD1
#define TMC_SW_SCK 27 // PD2
#endif
//
// Temperature Sensors
//

15
Marlin/src/pins/pins_RAMPS_RE_ARM.h

@ -68,26 +68,41 @@
#define X_STEP_PIN P2_01 // (54)
#define X_DIR_PIN P0_11 // (55)
#define X_ENABLE_PIN P0_10 // (38)
#define X_CS_PIN P1_01 // ETH
#define Y_STEP_PIN P2_02 // (60)
#define Y_DIR_PIN P0_20 // (61)
#define Y_ENABLE_PIN P0_19 // (56)
#define Y_CS_PIN P1_04 // ETH
#define Z_STEP_PIN P2_03 // (46)
#define Z_DIR_PIN P0_22 // (48)
#define Z_ENABLE_PIN P0_21 // (62)
#define Z_CS_PIN P1_10 // ETH
#define E0_STEP_PIN P2_00 // (26)
#define E0_DIR_PIN P0_05 // (28)
#define E0_ENABLE_PIN P0_04 // (24)
#define E0_CS_PIN P1_14 // ETH
#define E1_STEP_PIN P2_08 // (36)
#define E1_DIR_PIN P2_13 // (34)
#define E1_ENABLE_PIN P4_29 // (30)
#define E1_CS_PIN -1
#define E2_STEP_PIN P2_08 // (36)
#define E2_DIR_PIN P2_13 // (34)
#define E2_ENABLE_PIN P4_29 // (30)
#define E2_CS_PIN -1
//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#define TMC_SW_MOSI P1_00 // ETH
#define TMC_SW_MISO P1_08 // ETH
#define TMC_SW_SCK P1_09 // ETH
#endif
//
// Temperature Sensors

2
frameworks/CMSIS/LPC1768/lib/LiquidCrystal.cpp

@ -3,7 +3,7 @@
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <arduino.h>
#include <Arduino.h>
// When the display powers up, it is configured as follows:
//

2
frameworks/CMSIS/LPC1768/lib/Stream.cpp

@ -23,7 +23,7 @@
*/
#include <stdlib.h>
#include <arduino.h>
#include <Arduino.h>
#include "Stream.h"

1
platformio.ini

@ -113,6 +113,7 @@ lib_ldf_mode = off
lib_extra_dirs = frameworks
lib_deps = CMSIS-LPC1768
U8glib-HAL
TMC2130Stepper@>=2.1.1
extra_scripts = Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py
src_filter = ${common.default_src_filter}

Loading…
Cancel
Save