Преглед изворни кода

MKS Robin Pins fixes for STM32 and STM32F1 (#20404)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Victor Oliveira пре 4 година
родитељ
комит
6e4925e6b6
No account linked to committer's email address
2 измењених фајлова са 25 додато и 22 уклоњено
  1. 23
    17
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h
  2. 2
    5
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h

+ 23
- 17
Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h Прегледај датотеку

@@ -23,7 +23,6 @@
23 23
 
24 24
 /**
25 25
  * MKS Robin (STM32F130ZET6) board pin assignments
26
- *
27 26
  * https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware
28 27
  */
29 28
 
@@ -121,18 +120,9 @@
121 120
 #define PS_ON_PIN                           PA3   // PW_OFF
122 121
 #define FIL_RUNOUT_PIN                      PF11  // MT_DET
123 122
 
124
-#ifdef ARDUINO_ARCH_STM32F1
125
-  #define BEEPER_PIN                        PC13
126
-#else
127
-  #define BEEPER_PIN                        -1
128
-#endif
123
+#define BEEPER_PIN                          PC13
129 124
 #define LED_PIN                             PB2
130 125
 
131
-#if HAS_FSMC_TFT || HAS_GRAPHICAL_TFT
132
-  #define TFT_CS_PIN                        PG12  // NE4
133
-  #define TFT_RS_PIN                        PF0   // A0
134
-#endif
135
-
136 126
 #if HAS_FSMC_TFT
137 127
   /**
138 128
    * Note: MKS Robin TFT screens use various TFT controllers
@@ -140,23 +130,27 @@
140 130
    * ILI9488 is not supported
141 131
    * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
142 132
    *
143
-   * If the screen stays white, disable 'LCD_RESET_PIN'
133
+   * If the screen stays white, disable 'TFT_RESET_PIN'
144 134
    * to let the bootloader init the screen.
145 135
    *
146
-   * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
136
+   * Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu
147 137
    * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
148 138
    */
149
-  //#define LCD_RESET_PIN                   PF6
150
-  #define LCD_BACKLIGHT_PIN                 PG11
139
+  #define TFT_CS_PIN                        PG12  // NE4
140
+  #define TFT_RS_PIN                        PF0   // A0
141
+
151 142
   #define FSMC_CS_PIN                 TFT_CS_PIN
152 143
   #define FSMC_RS_PIN                 TFT_RS_PIN
153 144
 
154 145
   #define LCD_USE_DMA_FSMC                        // Use DMA transfers to send data to the TFT
155 146
   #define FSMC_DMA_DEV                      DMA2
156 147
   #define FSMC_DMA_CHANNEL               DMA_CH5
157
-#elif HAS_GRAPHICAL_TFT
148
+
158 149
   #define TFT_RESET_PIN                     PF6
159 150
   #define TFT_BACKLIGHT_PIN                 PG11
151
+
152
+  #define TOUCH_BUTTONS_HW_SPI
153
+  #define TOUCH_BUTTONS_HW_SPI_DEVICE          2
160 154
 #endif
161 155
 
162 156
 #if NEED_TOUCH_PINS
@@ -170,11 +164,23 @@
170 164
 // SPI1(PA7) & SPI3(PB5) not available
171 165
 #define SPI_DEVICE                             2
172 166
 
167
+#define SDIO_SUPPORT
173 168
 #if ENABLED(SDIO_SUPPORT)
174 169
   #define SCK_PIN                           PB13  // SPI2
175 170
   #define MISO_PIN                          PB14  // SPI2
176 171
   #define MOSI_PIN                          PB15  // SPI2
177
-  #define SD_DETECT_PIN                     PF12  // SD_CD
172
+  /**
173
+   * MKS Robin has a few hardware revisions
174
+   * https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware
175
+   *
176
+   * MKS Robin less or equal to V2.3 don't have SD_DETECT_PIN.
177
+   *
178
+   * MKS Robin greater or equal to V2.4 have SD_DETECT_PIN at PF12.
179
+   *
180
+   * You can uncomment it here, or you can add it SD_DETECT_PIN to your Configuration.h
181
+   */
182
+  //#define SD_DETECT_PIN                   -1
183
+  //#define SD_DETECT_PIN                   PF12  // SD_CD
178 184
 #else
179 185
   // SD as custom software SPI (SDIO pins)
180 186
   #define SCK_PIN                           PC12

+ 2
- 5
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h Прегледај датотеку

@@ -23,6 +23,7 @@
23 23
 
24 24
 /**
25 25
  * MKS Robin nano (STM32F130VET6) board pin assignments
26
+ * https://github.com/makerbase-mks/MKS-Robin-Nano-V1.X/tree/master/hardware
26 27
  */
27 28
 
28 29
 #if NOT_TARGET(STM32F1, STM32F1xx)
@@ -167,18 +168,14 @@
167 168
 
168 169
 /**
169 170
  * Note: MKS Robin TFT screens use various TFT controllers.
170
- * If the screen stays white, disable 'LCD_RESET_PIN'
171
+ * If the screen stays white, disable 'TFT_RESET_PIN'
171 172
  * to let the bootloader init the screen.
172 173
  */
173
-
174 174
 // Shared FSMC Configs
175 175
 #if HAS_FSMC_TFT
176 176
   #define DOGLCD_MOSI                       -1    // Prevent auto-define by Conditionals_post.h
177 177
   #define DOGLCD_SCK                        -1
178 178
 
179
-  #define FSMC_CS_PIN                       PD7   // NE4
180
-  #define FSMC_RS_PIN                       PD11  // A0
181
-
182 179
   #define TOUCH_CS_PIN                      PA7   // SPI2_NSS
183 180
   #define TOUCH_SCK_PIN                     PB13  // SPI2_SCK
184 181
   #define TOUCH_MISO_PIN                    PB14  // SPI2_MISO

Loading…
Откажи
Сачувај