Browse Source

✨ Opulo LumenPnP REV04 (#24718)

Stephen Hawes 1 year ago
parent
commit
35d4791518
No account linked to committer's email address

+ 1
- 0
Marlin/src/core/boards.h View File

@@ -421,6 +421,7 @@
421 421
 #define BOARD_ARTILLERY_RUBY          4238  // Artillery Ruby (STM32F401RC)
422 422
 #define BOARD_FYSETC_SPIDER_V2_2      4239  // FYSETC Spider V2.2 (STM32F446VE)
423 423
 #define BOARD_CREALITY_V24S1_301F4    4240  // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
424
+#define BOARD_OPULO_LUMEN_REV4        4241  // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
424 425
 
425 426
 //
426 427
 // ARM Cortex M7

+ 2
- 0
Marlin/src/pins/pins.h View File

@@ -701,6 +701,8 @@
701 701
   #include "stm32f4/pins_ARTILLERY_RUBY.h"      // STM32F4                                env:Artillery_Ruby
702 702
 #elif MB(CREALITY_V24S1_301F4)
703 703
   #include "stm32f4/pins_CREALITY_V24S1_301F4.h" // STM32F4                               env:STM32F401RC_creality env:STM32F401RC_creality_jlink env:STM32F401RC_creality_stlink
704
+#elif MB(OPULO_LUMEN_REV4)
705
+  #include "stm32f4/pins_OPULO_LUMEN_REV4.h"    // STM32F4                                env:Opulo_Lumen_REV4
704 706
 
705 707
 //
706 708
 // ARM Cortex M7

+ 206
- 0
Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h View File

@@ -0,0 +1,206 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+/**
25
+ * STM32F407VET6 on Opulo Lumen PnP Rev3
26
+ * Website - https://opulo.io/
27
+ */
28
+
29
+#define ALLOW_STM32DUINO
30
+#include "env_validate.h"
31
+
32
+#define BOARD_INFO_NAME      "LumenPnP Motherboard REV04"
33
+#define DEFAULT_MACHINE_NAME "LumenPnP"
34
+
35
+/**
36
+ * By default, the extra stepper motor configuration is:
37
+ * I = Left Head
38
+ * J = Right Head
39
+ * K = Auxiliary (Conveyor belt)
40
+ */
41
+
42
+#define SRAM_EEPROM_EMULATION
43
+#define MARLIN_EEPROM_SIZE                0x2000  // 8K
44
+
45
+// I2C MCP3426 (16-Bit, 240SPS, dual-channel ADC)
46
+#define HAS_MCP3426_ADC
47
+
48
+//
49
+// Servos
50
+//
51
+#define SERVO0_PIN                          PB10
52
+#define SERVO1_PIN                          PB11
53
+
54
+//
55
+// Limit Switches
56
+//
57
+#define X_STOP_PIN                          PC6
58
+#define Y_STOP_PIN                          PD15
59
+#define Z_STOP_PIN                          PD14
60
+
61
+// None of these require limit switches by default, so we leave these commented
62
+// here for your reference.
63
+//#define I_MIN_PIN                         PA8
64
+//#define I_MAX_PIN                         PA8
65
+//#define J_MIN_PIN                         PD13
66
+//#define J_MAX_PIN                         PD13
67
+//#define K_MIN_PIN                         PC9
68
+//#define K_MAX_PIN                         PC9
69
+
70
+//
71
+// Steppers
72
+//
73
+#define X_STEP_PIN                          PB15
74
+#define X_DIR_PIN                           PB14
75
+#define X_ENABLE_PIN                        PD9
76
+
77
+#define Y_STEP_PIN                          PE15
78
+#define Y_DIR_PIN                           PE14
79
+#define Y_ENABLE_PIN                        PB13
80
+
81
+#define Z_STEP_PIN                          PE7
82
+#define Z_DIR_PIN                           PB1
83
+#define Z_ENABLE_PIN                        PE9
84
+
85
+#define I_STEP_PIN                          PC4
86
+#define I_DIR_PIN                           PA4
87
+#define I_ENABLE_PIN                        PB0
88
+
89
+#define J_STEP_PIN                          PE11
90
+#define J_DIR_PIN                           PE10
91
+#define J_ENABLE_PIN                        PE13
92
+
93
+#define K_STEP_PIN                          PD6
94
+#define K_DIR_PIN                           PD7
95
+#define K_ENABLE_PIN                        PA3
96
+
97
+#if HAS_TMC_SPI
98
+  /**
99
+   * Make sure to configure the jumpers on the back side of the Mobo according to
100
+   * this diagram: https://github.com/MarlinFirmware/Marlin/pull/23851
101
+   */
102
+  #error "SPI drivers require a custom jumper configuration, see comment above! Comment out this line to continue."
103
+
104
+  #if AXIS_HAS_SPI(X)
105
+    #define X_CS_PIN                        PD8
106
+  #endif
107
+  #if AXIS_HAS_SPI(Y)
108
+    #define Y_CS_PIN                        PB12
109
+  #endif
110
+  #if AXIS_HAS_SPI(Z)
111
+    #define Z_CS_PIN                        PE8
112
+  #endif
113
+  #if AXIS_HAS_SPI(I)
114
+    #define I_CS_PIN                        PC5
115
+  #endif
116
+  #if AXIS_HAS_SPI(J)
117
+    #define J_CS_PIN                        PE12
118
+  #endif
119
+  #if AXIS_HAS_SPI(K)
120
+    #define K_CS_PIN                        PA2
121
+  #endif
122
+
123
+#elif HAS_TMC_UART
124
+
125
+  #define X_SERIAL_TX_PIN                   PD8
126
+  #define X_SERIAL_RX_PIN        X_SERIAL_TX_PIN
127
+
128
+  #define Y_SERIAL_TX_PIN                   PB12
129
+  #define Y_SERIAL_RX_PIN        Y_SERIAL_TX_PIN
130
+
131
+  #define Z_SERIAL_TX_PIN                   PE8
132
+  #define Z_SERIAL_RX_PIN        Z_SERIAL_TX_PIN
133
+
134
+  #define I_SERIAL_TX_PIN                   PC5
135
+  #define I_SERIAL_RX_PIN        I_SERIAL_TX_PIN
136
+
137
+  #define J_SERIAL_TX_PIN                   PE12
138
+  #define J_SERIAL_RX_PIN        J_SERIAL_TX_PIN
139
+
140
+  #define K_SERIAL_TX_PIN                   PA2
141
+  #define K_SERIAL_RX_PIN        K_SERIAL_TX_PIN
142
+
143
+  // Reduce baud rate to improve software serial reliability
144
+  #define TMC_BAUD_RATE                    19200
145
+
146
+#endif
147
+
148
+//
149
+// Heaters / Fans
150
+//
151
+#define FAN_PIN                             PE2
152
+#define FAN1_PIN                            PE3
153
+#define FAN2_PIN                            PE4
154
+#define FAN3_PIN                            PE5
155
+
156
+#define FAN_SOFT_PWM_REQUIRED
157
+
158
+//
159
+// Neopixel
160
+//
161
+#define NEOPIXEL_PIN                        PC7
162
+#define NEOPIXEL2_PIN                       PC8
163
+
164
+//
165
+// SPI
166
+//
167
+#define MISO_PIN                            PB4
168
+#define MOSI_PIN                            PB5
169
+#define SCK_PIN                             PB3
170
+
171
+#define TMC_SW_MISO                     MISO_PIN
172
+#define TMC_SW_MOSI                     MOSI_PIN
173
+#define TMC_SW_SCK                       SCK_PIN
174
+
175
+//
176
+// I2C
177
+//
178
+#define I2C_SDA_PIN                         PB7
179
+#define I2C_SCL_PIN                         PB6
180
+
181
+/**
182
+ * The index mobo rev03 has 3 aux ports. We define them here so they may be used
183
+ * in other places and to make sure someone doesn't have to go look up the pinout
184
+ * in the board files. Each 12 pin aux port has this pinout:
185
+ *
186
+ * VDC    1   2    GND
187
+ * 3.3V   3   4    SCL  (I2C_SCL_PIN)
188
+ * PWM1   5   6    SDA  (I2C_SDA_PIN)
189
+ * PWM2   7   8    CIPO (MISO_PIN)
190
+ * A1     9  10    COPI (MOSI_PIN)
191
+ * A2     11 12    SCK  (SCK_PIN)
192
+ */
193
+#define LUMEN_AUX1_PWM1                     PA15
194
+#define LUMEN_AUX1_PWM2                     PA5
195
+#define LUMEN_AUX1_A1                       PC0
196
+#define LUMEN_AUX1_A2                       PC1
197
+
198
+#define LUMEN_AUX2_PWM1                     PA6
199
+#define LUMEN_AUX2_PWM2                     PA7
200
+#define LUMEN_AUX2_A1                       PC2
201
+#define LUMEN_AUX2_A2                       PC3
202
+
203
+#define LUMEN_AUX3_PWM1                     PB8
204
+#define LUMEN_AUX3_PWM2                     PB9
205
+#define LUMEN_AUX3_A1                       PA0
206
+#define LUMEN_AUX3_A2                       PA1

+ 51
- 0
buildroot/share/PlatformIO/boards/marlin_opulo_lumen_rev4.json View File

@@ -0,0 +1,51 @@
1
+{
2
+  "build": {
3
+    "core": "stm32",
4
+    "cpu": "cortex-m4",
5
+    "extra_flags": "-DSTM32F407xx",
6
+    "f_cpu": "168000000L",
7
+    "hwids": [
8
+      [
9
+        "0x0483",
10
+        "0xdf11"
11
+      ],
12
+      [
13
+        "0x1EAF",
14
+        "0x0003"
15
+      ],
16
+      [
17
+        "0x0483",
18
+        "0x3748"
19
+      ]
20
+    ],
21
+    "mcu": "stm32f407vet6",
22
+    "variant": "MARLIN_F407VE"
23
+  },
24
+  "debug": {
25
+    "jlink_device": "STM32F407VE",
26
+    "openocd_target": "stm32f4x",
27
+    "svd_path": "STM32F40x.svd"
28
+  },
29
+  "frameworks": [
30
+    "arduino",
31
+    "stm32cube"
32
+  ],
33
+  "name": "STM32F407VE (192k RAM. 512k Flash)",
34
+  "upload": {
35
+    "disable_flushing": false,
36
+    "maximum_ram_size": 131072,
37
+    "maximum_size": 524288,
38
+    "protocol": "dfu",
39
+    "protocols": [
40
+      "stlink",
41
+      "dfu",
42
+      "jlink",
43
+      "blackmagic"
44
+    ],
45
+    "require_upload_port": true,
46
+    "use_1200bps_touch": false,
47
+    "wait_for_upload_port": false
48
+  },
49
+  "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f407ve.html",
50
+  "vendor": "Generic"
51
+}

+ 11
- 0
ini/stm32f4.ini View File

@@ -94,6 +94,17 @@ build_flags       = ${stm32_variant.build_flags}
94 94
 extra_scripts     = ${stm32_variant.extra_scripts}
95 95
 
96 96
 #
97
+# STM32F407VET6 Opulo Lumen REV4
98
+#
99
+[env:Opulo_Lumen_REV4]
100
+extends           = stm32_variant
101
+board             = marlin_opulo_lumen_rev4
102
+build_flags       = ${stm32_variant.build_flags}
103
+  -DARDUINO_BLACK_F407VE
104
+  -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
105
+extra_scripts     = ${stm32_variant.extra_scripts}
106
+
107
+#
97 108
 # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
98 109
 #
99 110
 [Anet_ET4]

Loading…
Cancel
Save