Browse Source

GTM32 Pro pins updates (#14505)

Alexander Amelkin 6 years ago
parent
commit
7a42132002
1 changed files with 118 additions and 79 deletions
  1. 118
    79
      Marlin/src/pins/pins_GTM32_PRO_VB.h

+ 118
- 79
Marlin/src/pins/pins_GTM32_PRO_VB.h View File

34
 #define BOARD_NAME "GTM32 Pro VB"
34
 #define BOARD_NAME "GTM32 Pro VB"
35
 
35
 
36
 //#define DISABLE_DEBUG
36
 //#define DISABLE_DEBUG
37
+
38
+//
39
+// It is required to disable JTAG function because its pins are
40
+// used as GPIO to drive the Y axis stepper.
41
+// DO NOT ENABLE!
42
+//
37
 #define DISABLE_JTAG
43
 #define DISABLE_JTAG
44
+
45
+//
46
+// If you don't need the SWDIO functionality (any more), you may
47
+// disable SWD here to regain PA13/PA14 pins for other use.
48
+//
38
 //#define DISABLE_JTAGSWD
49
 //#define DISABLE_JTAGSWD
39
 
50
 
40
 // Ignore temp readings during development.
51
 // Ignore temp readings during development.
41
 #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
52
 #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
42
 
53
 
54
+// Enable EEPROM Emulation for this board as it doesn't have EEPROM
55
+#define FLASH_EEPROM_EMULATION
56
+#define E2END 0xFFF // EEPROM end address (4kB)
57
+
43
 //
58
 //
44
 // Limit Switches
59
 // Limit Switches
45
 //
60
 //
46
-#define X_MIN_PIN          PE5
47
-#define X_MAX_PIN          PE4
48
-#define Y_MIN_PIN          PE3
49
-#define Y_MAX_PIN          PE2
50
-#define Z_MIN_PIN          PE1
51
-#define Z_MAX_PIN          PE0
61
+#define X_MIN_PIN          PE5   // ENDSTOPS 15,17
62
+#define X_MAX_PIN          PE4   // ENDSTOPS 16,18
63
+#define Y_MIN_PIN          PE3   // ENDSTOPS 9,11
64
+#define Y_MAX_PIN          PE2   // ENDSTOPS 10,12
65
+#define Z_MIN_PIN          PE1   // ENDSTOPS 3,5
66
+#define Z_MAX_PIN          PE0   // ENDSTOPS 4,6
52
 
67
 
53
 //
68
 //
54
 // Steppers
69
 // Steppers
65
 #define Z_DIR_PIN          PD3
80
 #define Z_DIR_PIN          PD3
66
 #define Z_ENABLE_PIN       PB3
81
 #define Z_ENABLE_PIN       PB3
67
 
82
 
68
-#define E0_STEP_PIN        PB2
69
-#define E0_DIR_PIN         PB11
70
-#define E0_ENABLE_PIN      PC4
83
+// Extruder stepper pins
84
+// NOTE: Numbering here is made according to EXT connector numbers,
85
+//       the FANx_PWM line numbering in the schematics is reverse.
86
+//       That is, E0_*_PIN are the E2_* lines connected to E2_A1 step
87
+//       stick that drives the EXT0 output on the board.
88
+//
89
+#define E0_STEP_PIN        PC14
90
+#define E0_DIR_PIN         PC13
91
+#define E0_ENABLE_PIN      PC15
71
 
92
 
72
 #define E1_STEP_PIN        PA0
93
 #define E1_STEP_PIN        PA0
73
 #define E1_DIR_PIN         PB6
94
 #define E1_DIR_PIN         PB6
74
 #define E1_ENABLE_PIN      PA1
95
 #define E1_ENABLE_PIN      PA1
75
 
96
 
76
-#define E2_STEP_PIN        PC14
77
-#define E2_DIR_PIN         PC13
78
-#define E2_ENABLE_PIN      PC15
97
+#define E2_STEP_PIN        PB2
98
+#define E2_DIR_PIN         PB11
99
+#define E2_ENABLE_PIN      PC4
79
 
100
 
80
 //
101
 //
81
 // Heaters / Fans
102
 // Heaters / Fans
82
 //
103
 //
83
-#define HEATER_0_PIN       PB0
84
-#define HEATER_1_PIN       PB5
85
-#define HEATER_2_PIN       PB4
86
-#define HEATER_BED_PIN     PB1
104
+#define HEATER_0_PIN       PB0   // EXT0 port
105
+#define HEATER_1_PIN       PB5   // EXT1 port
106
+#define HEATER_2_PIN       PB4   // EXT2 port
107
+#define HEATER_BED_PIN     PB1   // CON2X3 hotbed port
87
 
108
 
88
-#define FAN_PIN            PB7   // TODO: Add functionality
89
-#define FAN1_PIN           PB8   // TODO: Add functionality
90
-#define FAN2_PIN           PB9   // TODO: Add functionality
109
+//
110
+// These are FAN PWM pins on EXT0..EXT2 connectors.
111
+//
112
+//#define FAN_PIN            PB9   // EXT0 port
113
+#define ORIG_E0_AUTO_FAN_PIN PB9   // EXT0 port, used as main extruder fan
114
+#define FAN1_PIN           PB8   // EXT1 port
115
+#define FAN2_PIN           PB7   // EXT2 port
91
 
116
 
92
 //
117
 //
93
 // Temperature Sensors
118
 // Temperature Sensors
94
 //
119
 //
95
-#define TEMP_0_PIN         PC2   // PORT NUMBERING
96
-#define TEMP_1_PIN         PC1   // PORT NUMBERING
97
-#define TEMP_2_PIN         PC0   // PORT NUMBERING
98
-#define TEMP_BED_PIN       PC3   // PORT NUMBERING
120
+#define TEMP_0_PIN         PC2   // EXT0 port
121
+#define TEMP_1_PIN         PC1   // EXT1 port
122
+#define TEMP_2_PIN         PC0   // EXT2 port
123
+#define TEMP_BED_PIN       PC3   // CON2X3 hotbed port
99
 
124
 
100
 //
125
 //
101
 // Misc. Functions
126
 // Misc. Functions
102
 //
127
 //
103
 #define LED_PWM            PD12   // External LED, pin 2 on LED labeled connector
128
 #define LED_PWM            PD12   // External LED, pin 2 on LED labeled connector
104
-//#define RESET_PIN        NRST
105
-#define T_PEN              PE6
106
-
107
-#define BEEPER_PIN         PB10
108
 
129
 
109
 //
130
 //
110
 // LCD / Controller
131
 // LCD / Controller
112
 #if HAS_SPI_LCD
133
 #if HAS_SPI_LCD
113
 
134
 
114
   #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
135
   #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
136
+    //
137
+    // LCD display on J2 FFC40
138
+    // Geeetech's LCD2004A Control Panel is very much like
139
+    // RepRapDiscount Smart Controller, but adds an FFC40 connector
140
+    //
115
     #define LCD_PINS_RS    PE6   // CS chip select /SS chip slave select
141
     #define LCD_PINS_RS    PE6   // CS chip select /SS chip slave select
116
     #define LCD_PINS_ENABLE PE14 // SID (MOSI)
142
     #define LCD_PINS_ENABLE PE14 // SID (MOSI)
117
     #define LCD_PINS_D4    PD8   // SCK (CLK) clock
143
     #define LCD_PINS_D4    PD8   // SCK (CLK) clock
119
     #define LCD_PINS_D6    PD10
145
     #define LCD_PINS_D6    PD10
120
     #define LCD_PINS_D7    PE15
146
     #define LCD_PINS_D7    PE15
121
 
147
 
122
-    #define BTN_EN1        PE8
123
-    #define BTN_EN2        PE9
124
-    #define BTN_ENC        PE13
125
-
126
-    #define SD_DETECT_PIN  PC7
127
-    #define KILL_PIN       -1
148
+  #else
149
+    //
150
+    // Serial LCDs can be implemented in ExtUI
151
+    //
152
+    //#define LCD_UART_TX    PD8
153
+    //#define LCD_UART_RX    PD9
128
   #endif
154
   #endif
129
 
155
 
130
   #ifndef ST7920_DELAY_1
156
   #ifndef ST7920_DELAY_1
137
     #define ST7920_DELAY_3 DELAY_NS(715)
163
     #define ST7920_DELAY_3 DELAY_NS(715)
138
   #endif
164
   #endif
139
 
165
 
140
-  //
141
-  // UART LCD Pins, if used
142
-  //
143
-  //#define LCD_PINS_D14   PD9   // RXD3
144
-  //#define LCD_PINS_D13   PD8   // TXD3
145
-
146
 #endif // HAS_SPI_LCD
166
 #endif // HAS_SPI_LCD
147
 
167
 
148
-//
149
-// SPI2 on LCD conn
150
-//
151
-#define SPI2_MOSI          PB15
152
-#define SPI2_MISO          PB14
153
-#define SPI2_SCK           PB13
154
-#define SPI2_NSS           PB12
155
-
156
-//
157
-// SD Card on LCD
158
-//
159
-#define SD_CD              PC7
160
-#define SD_DATA0           PC8
161
-#define SD_DATA1           PC9
162
-#define SD_DATA2           PC10
163
-#define SD_DATA3           PC11
164
-#define SD_CMD             PD2
165
-#define SD_CLK             PC12
168
+#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
169
+  //
170
+  // Geeetech's LCD2004A Control Panel is very much like
171
+  // RepRapDiscount Smart Controller, but adds an FFC40 connector
172
+  // connected with a flat wire to J2 connector on the board.
173
+  //
174
+  #define BTN_EN1          PE8
175
+  #define BTN_EN2          PE9
176
+  #define BTN_ENC          PE13
166
 
177
 
167
-//
168
-// SPI Flash (on board Card Socket)
169
-//
170
-#define SPI1_NSS           PA4
171
-#define SPI1_SCK           PA5
172
-#define SPI1_MISO          PA6
173
-#define SPI1_MOSI          PA7
178
+  #define GTM32_PRO_VB_USE_LCD_BEEPER
179
+  #define GTM32_PRO_VB_USE_EXT_SDCARD
180
+#endif
174
 
181
 
175
 //
182
 //
176
-// Debug
183
+// Beeper
177
 //
184
 //
178
-//#define SDA              PA13
179
-//#define SCL              PA14
185
+#ifdef GTM32_PRO_VB_USE_LCD_BEEPER
186
+  // This is pin 32 on J2 FFC40 and pin, goes to the beeper
187
+  // on Geeetech's version of RepRapDiscount Smart Controller
188
+  // (e.g. on Rostock 301)
189
+  #define BEEPER_PIN       PE12
190
+#else
191
+  // This is the beeper on the board itself
192
+  #define BEEPER_PIN       PB10
193
+#endif
180
 
194
 
181
-//
182
-// Wifi
183
-//
184
-#define USART2_RX          PA3   // Default alternate function
185
-#define USART2_TX          PA2   // Default alternate function
195
+/**
196
+ * The on-board TF_CARD_SOCKET microSD card socket has no SD Detect pin wired.
197
+ *
198
+ * The FFC10 (SD_CARD) connector has the same pins as those routed to the FFC40 (J2)
199
+ * connector, which usually go to the SD Card slot on the Geeetech version of the
200
+ * RepRapDiscount Smart Controller. Both connectors have the card detect signal.
201
+ *
202
+ * The on-board SD card and the external card (on either SD_CARD or J2) are two
203
+ * separate devices and can work simultaneously. Unfortunately, Marlin only supports
204
+ * a single SPI Flash device (as of 2019-07-05) so only one is enabled here.
205
+ */
206
+#if ENABLED(GTM32_PRO_VB_USE_EXT_SDCARD)
207
+  //
208
+  // SD Card on RepRapDiscount Smart Controller (J2) or on SD_CARD connector
209
+  //
210
+  #define SS_PIN           PC11
211
+  #define SCK_PIN          PC12
212
+  #define MOSI_PIN         PD2
213
+  #define MISO_PIN         PC8
214
+  #define SD_DETECT_PIN    PC7
215
+#else
216
+  //
217
+  // Use the on-board card socket labeled TF_CARD_SOCKET
218
+  //
219
+  #define SS_PIN           PA4
220
+  #define SCK_PIN          PA5
221
+  #define MOSI_PIN         PA7
222
+  #define MISO_PIN         PA6
223
+  #define SD_DETECT_PIN    -1  // Card detect is not connected
224
+#endif
186
 
225
 
226
+#define SDSS               SS_PIN
227
+ 
187
 //
228
 //
188
-// For future use
229
+// ESP WiFi can be soldered to J9 connector which is wired to USART2.
230
+// Must define WIFISUPPORT in Configuration.h for the printer.
189
 //
231
 //
190
-//#undef USB_DM
191
-//#undef CAN_TX
192
-//#undef USB_DP
193
-//#undef CAN_RX
194
-//#undef BOARD_JTDI_PIN
195
-//#define BOOT0            BOOT0
232
+#define ESP_WIFI_MODULE_COM       2
233
+#define ESP_WIFI_MODULE_BAUDRATE  115200
234
+#define ESP_WIFI_MODULE_RESET_PIN -1

Loading…
Cancel
Save