|
@@ -16,34 +16,42 @@
|
16
|
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
|
17
|
*
|
18
|
18
|
*/
|
|
19
|
+#pragma once
|
19
|
20
|
|
20
|
21
|
/**
|
21
|
|
- * ALFAWISE U30 (STM32F103VET6) board pin assignments
|
|
22
|
+ * Longer3D LK1/LK2 & Alfawise U20/U30 (STM32F103VET6) board pin assignments
|
22
|
23
|
*/
|
23
|
24
|
|
24
|
25
|
#if !defined(__STM32F1__) && !defined(STM32F1xx)
|
25
|
26
|
#error "Oops! Select a STM32F1 board in 'Tools > Board.'"
|
26
|
27
|
#elif HOTENDS > 1 || E_STEPPERS > 1
|
27
|
|
- #error "LONGER3D only supports 1 hotend / E-stepper. Comment out this line to continue."
|
|
28
|
+ #error "Longer3D board only supports 1 hotend / E-stepper. Comment out this line to continue."
|
28
|
29
|
#endif
|
29
|
30
|
|
30
|
31
|
#define BOARD_NAME "Longer3D"
|
31
|
|
-#define ALFAWISE_UX0 // Common to all Alfawise STM32F1 boards
|
|
32
|
+#define ALFAWISE_UX0 // Common to all Longer3D STM32F1 boards (used for Open drain mosfets)
|
32
|
33
|
|
|
34
|
+//#define DISABLE_DEBUG // We still want to debug with STLINK...
|
|
35
|
+#define DISABLE_JTAG // We free the jtag pins (PA15) but keep STLINK
|
33
|
36
|
// Release PB4 (STEP_X_PIN) from JTAG NRST role.
|
34
|
|
-//#define DISABLE_DEBUG // > Hobi : We still want to debug with STLINK...
|
35
|
|
-#define DISABLE_JTAG // we free the jtag pins (PA15) but keep STLINK
|
36
|
|
-
|
37
|
37
|
//
|
38
|
38
|
// Limit Switches
|
39
|
39
|
//
|
40
|
|
-#define X_STOP_PIN PC1 // pin 16
|
41
|
|
-//#define X_MAX_PIN PC0 // pin 15 Used as filament sensor on Alfawise setup
|
|
40
|
+#define X_MIN_PIN PC1 // pin 16
|
|
41
|
+#define X_MAX_PIN PC0 // pin 15 (Filament sensor on Alfawise setup)
|
42
|
42
|
#define Y_MIN_PIN PC15 // pin 9
|
43
|
|
-//#define Y_MAX_PIN PC14 // pin 8 Unused in stock Alfawise setup
|
|
43
|
+#define Y_MAX_PIN PC14 // pin 8 (Unused in stock Alfawise setup)
|
44
|
44
|
#define Z_MIN_PIN PE6 // pin 5 Standard Endstop or Z_Probe endstop function
|
45
|
|
-//#define Z_MAX_PIN PE5 // pin 4 Unused in stock Alfawise setup
|
|
45
|
+#define Z_MAX_PIN PE5 // pin 4 (Unused in stock Alfawise setup)
|
46
|
46
|
// May be used for BLTouch Servo function on older variants (<= V08)
|
|
47
|
+
|
|
48
|
+//
|
|
49
|
+// Filament Sensor
|
|
50
|
+//
|
|
51
|
+#ifndef FIL_RUNOUT_PIN
|
|
52
|
+ #define FIL_RUNOUT_PIN PC0 // XMAX plug on PCB used as filament runout sensor on Alfawise boards (inverting true)
|
|
53
|
+#endif
|
|
54
|
+
|
47
|
55
|
//
|
48
|
56
|
// Steppers
|
49
|
57
|
//
|
|
@@ -78,12 +86,7 @@
|
78
|
86
|
#define FAN_PIN PA15 // pin 77 (4cm Fan)
|
79
|
87
|
#define FAN_SOFT_PWM // Required to avoid issues with heating or STLink
|
80
|
88
|
#define FAN_MIN_PWM 35 // Fan will not start in 1-30 range
|
81
|
|
-#define FAN_MAX_PWM 255
|
82
|
|
-
|
83
|
|
-// Filament Sensor
|
84
|
|
-#ifndef FIL_RUNOUT_PIN
|
85
|
|
- #define FIL_RUNOUT_PIN PC0 // XMAX plug on PCB used as filament runout sensor on Alfawise boards (inverting true)
|
86
|
|
-#endif
|
|
89
|
+#define FAN_MAX_PWM 255
|
87
|
90
|
|
88
|
91
|
//#define BEEPER_PIN PD13 // pin 60 (Servo PWM output 5V/GND on Board V0G+) made for BL-Touch sensor
|
89
|
92
|
// Can drive a PC Buzzer, if connected between PWM and 5V pins
|
|
@@ -93,17 +96,14 @@
|
93
|
96
|
//
|
94
|
97
|
// PWM
|
95
|
98
|
//
|
96
|
|
-//#define NUM_SERVOS 1
|
97
|
|
-//#define SERVO0_TIMER_NUM 1 // General or Adv. timer to use for the servo PWM (2 & 5 are reserved)
|
98
|
|
-
|
99
|
|
-#define SERVO0_PWM_OD
|
100
|
99
|
#define SERVO0_PIN PD13 // Open drain PWM pin on the V0G (GND or floating 5V)
|
|
100
|
+#define SERVO0_PWM_OD // Comment this if using PE5
|
101
|
101
|
|
102
|
|
-//#define SERVO0_PIN PE5 // Pulled up PWM pin on the V08 (3.3V or 0)
|
|
102
|
+//#define SERVO0_PIN PE5 // Pulled up PWM pin on the V08 (3.3V or 0)
|
103
|
103
|
|
104
|
104
|
/**
|
105
|
105
|
* Note: Alfawise screens use various TFT controllers. Supported screens
|
106
|
|
- * are based on the ILI9342, ILI9328 and ST7798V. Define init sequences for
|
|
106
|
+ * are based on the ILI9341, ILI9328 and ST7798V. Define init sequences for
|
107
|
107
|
* other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
|
108
|
108
|
*
|
109
|
109
|
* If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader
|
|
@@ -112,7 +112,6 @@
|
112
|
112
|
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
|
113
|
113
|
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
|
114
|
114
|
*/
|
115
|
|
-#pragma once
|
116
|
115
|
|
117
|
116
|
#define LCD_RESET_PIN PC4 // pin 33
|
118
|
117
|
#define LCD_BACKLIGHT_PIN PD12 // pin 59
|
|
@@ -123,8 +122,8 @@
|
123
|
122
|
#define FSMC_DMA_DEV DMA2
|
124
|
123
|
#define FSMC_DMA_CHANNEL DMA_CH5
|
125
|
124
|
|
126
|
|
-#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
|
127
|
|
-#define DOGLCD_SCK -1
|
|
125
|
+#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
|
|
126
|
+#define DOGLCD_SCK -1
|
128
|
127
|
|
129
|
128
|
/**
|
130
|
129
|
* Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer
|
|
@@ -146,13 +145,12 @@
|
146
|
145
|
//
|
147
|
146
|
// SPI1 (EEPROM W25Q64 + DAC OUT)
|
148
|
147
|
//
|
149
|
|
-
|
150
|
148
|
#undef E2END
|
151
|
|
-#define E2END 0x7FF // EEPROM end address (reserve 2kB on sd/sram, real spi one is 8MB/64Mbits)
|
|
149
|
+#define E2END 0x7FF // EEPROM end address (reserve 2kB on sd/sram, real spi one is 8MB/64Mbits)
|
152
|
150
|
/*
|
153
|
|
-#define SPI_EEPROM 1 // If commented this will create a file on the SD card as a replacement
|
154
|
|
-#define SPI_CHAN_EEPROM1 1
|
155
|
|
-#define SPI_EEPROM1_CS PC5 // pin 34
|
|
151
|
+#define SPI_EEPROM 1 // If commented this will create a file on the SD card as a replacement
|
|
152
|
+#define SPI_CHAN_EEPROM1 1
|
|
153
|
+#define SPI_EEPROM1_CS PC5 // pin 34
|
156
|
154
|
|
157
|
155
|
//#define EEPROM_SCK BOARD_SPI1_SCK_PIN // PA5 pin 30
|
158
|
156
|
//#define EEPROM_MISO BOARD_SPI1_MISO_PIN // PA6 pin 31
|