ソースを参照

📌 PandaPi V2.9 – Standalone mode (#23908)

Mark 2年前
コミット
a02a1def62
コミッターのメールアドレスに関連付けられたアカウントが存在しません
4個のファイルの変更236行の追加0行の削除
  1. 1
    0
      Marlin/src/core/boards.h
  2. 2
    0
      Marlin/src/pins/pins.h
  3. 222
    0
      Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h
  4. 11
    0
      ini/stm32f1.ini

+ 1
- 0
Marlin/src/core/boards.h ファイルの表示

@@ -364,6 +364,7 @@
364 364
 #define BOARD_ZONESTAR_ZM3E4          4061  // Zonestar ZM3E4 V1 (STM32F103VC)
365 365
 #define BOARD_ZONESTAR_ZM3E4V2        4062  // Zonestar ZM3E4 V2 (STM32F103VC)
366 366
 #define BOARD_ERYONE_ERY32_MINI       4063  // Eryone Ery32 mini (STM32F103VE)
367
+#define BOARD_PANDA_PI_V29            4064  // Panda Pi V2.9 - Standalone (STM32F103RC)
367 368
 
368 369
 //
369 370
 // ARM Cortex-M4F

+ 2
- 0
Marlin/src/pins/pins.h ファイルの表示

@@ -601,6 +601,8 @@
601 601
   #include "stm32f1/pins_ZM3E4_V2_0.h"          // STM32F1                                env:STM32F103VE_ZM3E4V2_USB env:STM32F103VE_ZM3E4V2_USB_maple
602 602
 #elif MB(ERYONE_ERY32_MINI)
603 603
   #include "stm32f1/pins_ERYONE_ERY32_MINI.h"   // STM32F103VET6                          env:ERYONE_ERY32_MINI_maple
604
+#elif MB(PANDA_PI_V29)
605
+  #include "stm32f1/pins_PANDA_PI_V29.h"        // STM32F103RCT6                          env:PANDA_PI_V29
604 606
 
605 607
 //
606 608
 // ARM Cortex-M4F

+ 222
- 0
Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h ファイルの表示

@@ -0,0 +1,222 @@
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
+#include "env_validate.h"
25
+ 
26
+#define BOARD_INFO_NAME "PANDA PI V2.9"
27
+
28
+// Release PB3/PB4 (TMC_SW Pins) from JTAG pins
29
+#define DISABLE_JTAG
30
+
31
+// Ignore temp readings during development.
32
+//#define BOGUS_TEMPERATURE_GRACE_PERIOD    2000
33
+
34
+#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
35
+  #define FLASH_EEPROM_EMULATION
36
+  #define EEPROM_PAGE_SIZE     (0x800U)           // 2KB
37
+  #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
38
+  #define MARLIN_EEPROM_SIZE    EEPROM_PAGE_SIZE  // 2KB
39
+#endif
40
+
41
+//
42
+// Servos
43
+//
44
+#define SERVO0_PIN                          PA11  // SERVOS
45
+
46
+//
47
+// Limit Switches
48
+//
49
+#define X_STOP_PIN                          PA3   // X-STOP
50
+#define Y_STOP_PIN                          PC9   // Y-STOP
51
+#define Z_STOP_PIN                          PA1   // Z-STOP
52
+
53
+//
54
+// Z Probe must be this pin
55
+//
56
+//#define Z_MIN_PROBE_PIN                   PA1   // PROBE
57
+
58
+//
59
+// Filament Runout Sensor
60
+//
61
+//#ifndef FIL_RUNOUT_PIN
62
+//  #define FIL_RUNOUT_PIN                  PC2   // E0-STOP
63
+//#endif
64
+
65
+//
66
+// Steppers
67
+//
68
+#define X_ENABLE_PIN                        PC12
69
+#define X_STEP_PIN                          PC11
70
+#define X_DIR_PIN                           PB6
71
+
72
+#define Y_ENABLE_PIN                        PC12
73
+#define Y_STEP_PIN                          PB5
74
+#define Y_DIR_PIN                           PB4
75
+
76
+#define Z_ENABLE_PIN                        PC12
77
+#define Z_STEP_PIN                          PB3
78
+#define Z_DIR_PIN                           PA15
79
+
80
+#define E0_ENABLE_PIN                       PC12
81
+#define E0_STEP_PIN                         PB15
82
+#define E0_DIR_PIN                          PB14
83
+
84
+//
85
+// Software SPI pins for TMC2130 stepper drivers
86
+//
87
+#if ENABLED(TMC_USE_SW_SPI)
88
+  #ifndef TMC_SW_MOSI
89
+    #define TMC_SW_MOSI                     PB5
90
+  #endif
91
+  #ifndef TMC_SW_MISO
92
+    #define TMC_SW_MISO                     PB4
93
+  #endif
94
+  #ifndef TMC_SW_SCK
95
+    #define TMC_SW_SCK                      PB3
96
+  #endif
97
+#endif
98
+
99
+#if HAS_TMC_UART
100
+  /**
101
+   * TMC2208/TMC2209 stepper drivers
102
+   *
103
+   * Hardware serial communication ports.
104
+   * If undefined software serial is used according to the pins below
105
+   */
106
+  //#define X_HARDWARE_SERIAL  MSerial1
107
+  //#define Y_HARDWARE_SERIAL  MSerial1
108
+  //#define Z_HARDWARE_SERIAL  MSerial1
109
+  //#define E0_HARDWARE_SERIAL MSerial1
110
+
111
+  #define X_SERIAL_TX_PIN                   PC10
112
+  #define X_SERIAL_RX_PIN        X_SERIAL_TX_PIN
113
+
114
+  #define Y_SERIAL_TX_PIN                   PC11
115
+  #define Y_SERIAL_RX_PIN        Y_SERIAL_TX_PIN
116
+
117
+  #define Z_SERIAL_TX_PIN                   PC12
118
+  #define Z_SERIAL_RX_PIN        Z_SERIAL_TX_PIN
119
+
120
+  #define E0_SERIAL_TX_PIN                  PD2
121
+  #define E0_SERIAL_RX_PIN      E0_SERIAL_TX_PIN
122
+
123
+  // Reduce baud rate to improve software serial reliability
124
+  #define TMC_BAUD_RATE                    19200
125
+#endif
126
+
127
+//
128
+// Temperature Sensors
129
+//
130
+#define TEMP_0_PIN                          PB0   // Analog Input "TH0"
131
+#define TEMP_BED_PIN                        PB1   // Analog Input "TB0"
132
+#define TEMP_1_PIN                          PA2
133
+
134
+//
135
+// Heaters / Fans
136
+//
137
+#define HEATER_0_PIN                        PB12  // "HE"
138
+#define HEATER_BED_PIN                      PB13  // "HB"
139
+#define FAN_PIN                             PA8   // "FAN0"
140
+#define HEATER_1_PIN                        PA12
141
+
142
+//
143
+// SD Support
144
+//
145
+#define ONBOARD_SPI_DEVICE                     1  // SPI1
146
+#define ONBOARD_SD_CS_PIN                   PA4   // Chip select for "System" SD card
147
+#define SDSS                   ONBOARD_SD_CS_PIN
148
+
149
+#ifndef SDCARD_CONNECTION
150
+  #define SDCARD_CONNECTION              ONBOARD
151
+#endif
152
+#if SD_CONNECTION_IS(ONBOARD)
153
+  //#define SD_DETECT_PIN                   PA4
154
+  #define SD_SCK_PIN                        PA5
155
+  #define SD_MISO_PIN                       PA6
156
+  #define SD_MOSI_PIN                       PA7
157
+#elif SD_CONNECTION_IS(CUSTOM_CABLE)
158
+  #error "SD CUSTOM_CABLE is not compatible with SKR E3 DIP."
159
+#endif
160
+
161
+//
162
+// LCD / Controller
163
+//
164
+#if HAS_WIRED_LCD
165
+  #define BTN_ENC                           PA0
166
+  #define BTN_EN1                           PC4
167
+  #define BTN_EN2                           PC5
168
+
169
+  #define LCD_PINS_RS                       PC0
170
+  #define LCD_PINS_ENABLE                   PC2
171
+  #define LCD_PINS_D4                       PC1
172
+#endif
173
+
174
+#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
175
+
176
+  #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_E3_DIP.h' for details. Comment out this line to continue."
177
+
178
+  /** FYSETC TFT TFT81050 display pinout
179
+   *
180
+   *               Board                                     Display
181
+   *               -----                                      -----
182
+   *           5V | 1 2 | GND               (SPI1-MISO) MISO | 1 2 | SCK   (SPI1-SCK)
183
+   * (FREE)   PB7 | 3 4 | PB8  (LCD_CS)     (PA9)  MOD_RESET | 3 4 | SD_CS (PA10)
184
+   * (FREE)   PB9 | 5 6   PA10 (SD_CS)      (PB8)     LCD_CS | 5 6   MOSI  (SPI1-MOSI)
185
+   *        RESET | 7 8 | PA9  (MOD_RESET)  (PA15)    SD_DET | 7 8 | RESET
186
+   * (BEEPER) PB6 | 9 10| PA15 (SD_DET)                  GND | 9 10| 5V
187
+   *               -----                                      -----
188
+   *                EXP1                                       EXP1
189
+   *
190
+   * Needs custom cable:
191
+   *
192
+   *    Board   Adapter   Display
193
+   *           _________
194
+   *   EXP1-1 ----------- EXP1-10
195
+   *   EXP1-2 ----------- EXP1-9
196
+   *   SPI1-4 ----------- EXP1-6
197
+   *   EXP1-4 ----------- EXP1-5
198
+   *   SP11-3 ----------- EXP1-2
199
+   *   EXP1-6 ----------- EXP1-4
200
+   *   EXP1-7 ----------- EXP1-8
201
+   *   EXP1-8 ----------- EXP1-3
202
+   *   SPI1-1 ----------- EXP1-1
203
+   *  EXP1-10 ----------- EXP1-7
204
+   */
205
+
206
+  #define CLCD_SPI_BUS                         1  // SPI1 connector
207
+
208
+  #define BEEPER_PIN                        PB6
209
+
210
+  #define CLCD_MOD_RESET                    PA9
211
+  #define CLCD_SPI_CS                       PB8
212
+
213
+  #if SD_CONNECTION_IS(LCD) && BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
214
+    #define SD_DETECT_PIN                   PA15
215
+    #define SD_SS_PIN                       PA10
216
+  #endif
217
+
218
+#elif HAS_WIRED_LCD
219
+
220
+  #define BEEPER_PIN                        PC3
221
+
222
+#endif

+ 11
- 0
ini/stm32f1.ini ファイルの表示

@@ -74,6 +74,17 @@ build_flags       = ${env:STM32F103RC_btt.build_flags}
74 74
 build_unflags     = ${common_stm32.build_unflags} -DUSBD_USE_CDC
75 75
 
76 76
 #
77
+# Panda Pi V2.9 - Standalone (STM32F103RC)
78
+# Headless, without direct Pi control, but potentially hosting OctoPrint, stepdaemon, etc.
79
+#
80
+[env:PANDA_PI_V29]
81
+extends                     = common_STM32F103RC_variant
82
+build_flags                 = ${common_STM32F103RC_variant.build_flags}
83
+                              -DTIMER_SERVO=TIM1
84
+board_build.offset          = 0x5000
85
+board_upload.offset_address = 0x08005000
86
+
87
+#
77 88
 # MKS Robin (STM32F103ZET6)
78 89
 # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
79 90
 #

読み込み中…
キャンセル
保存