Bläddra i källkod

MKS Robin: SD pins not required (SDIO) (#15474)

Tanguy Pruvot 5 år sedan
förälder
incheckning
c6ffa7f38d
1 ändrade filer med 27 tillägg och 18 borttagningar
  1. 27
    18
      Marlin/src/pins/stm32/pins_MKS_ROBIN.h

+ 27
- 18
Marlin/src/pins/stm32/pins_MKS_ROBIN.h Visa fil

23
 
23
 
24
 /**
24
 /**
25
  * MKS Robin (STM32F130ZET6) board pin assignments
25
  * MKS Robin (STM32F130ZET6) board pin assignments
26
+ *
27
+ * https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware
26
  */
28
  */
27
 
29
 
28
 #ifndef __STM32F1__
30
 #ifndef __STM32F1__
36
 //
38
 //
37
 // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
39
 // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
38
 //
40
 //
39
-#define DISABLE_DEBUG
41
+#define DISABLE_JTAG
40
 
42
 
41
 //
43
 //
42
 // Servos
44
 // Servos
110
 
112
 
111
 /**
113
 /**
112
  * Note: MKS Robin TFT screens use various TFT controllers. Supported screens
114
  * Note: MKS Robin TFT screens use various TFT controllers. Supported screens
113
- * are based on the ILI9342, ILI9328 and ST7798V. Define init sequences for
115
+ * are based on the ILI9341, ILI9328 and ST7798V. Define init sequences for
114
  * other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
116
  * other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
115
  *
117
  *
116
  * If the screen stays white, disable 'LCD_RESET_PIN'
118
  * If the screen stays white, disable 'LCD_RESET_PIN'
125
 #define FSMC_RS_PIN        PF0   // A0
127
 #define FSMC_RS_PIN        PF0   // A0
126
 
128
 
127
 #if ENABLED(TOUCH_BUTTONS)
129
 #if ENABLED(TOUCH_BUTTONS)
128
-  #define TOUCH_CS_PIN     PB1
130
+  #define TOUCH_CS_PIN     PB1   // SPI2_NSS
131
+  #define TOUCH_SCK_PIN    PB13  // SPI2_SCK
132
+  #define TOUCH_MISO_PIN   PB14  // SPI2_MISO
133
+  #define TOUCH_MOSI_PIN   PB15  // SPI2_MOSI
129
 #endif
134
 #endif
130
 
135
 
131
-//
132
-// Custom SPI pins
133
-//
134
-#define SCK_PIN            PC12
135
-#define MISO_PIN           PC8
136
-#define MOSI_PIN           PD2
137
-#define SS_PIN              -1
138
-
139
-//
140
-// Onboard SD Card
141
-//
142
-#define ONBOARD_SD_CS      PC11
143
-#define SDSS               PD2
144
-
145
-#define SD_DETECT_PIN       -1   // PF12
136
+// SPI1(PA7) & SPI3(PB5) not available
137
+#define ENABLE_SPI2
138
+
139
+#if ENABLED(SDIO_SUPPORT)
140
+  #define SCK_PIN           PB13 // SPI2
141
+  #define MISO_PIN          PB14 // SPI2
142
+  #define MOSI_PIN          PB15 // SPI2
143
+  #define SS_PIN            -1   // PB12 is X-
144
+  #define SD_DETECT_PIN     PF12 // SD_CD
145
+#else
146
+  // SD as custom software SPI (SDIO pins)
147
+  #define SCK_PIN           PC12
148
+  #define MISO_PIN          PC8
149
+  #define MOSI_PIN          PD2
150
+  #define SS_PIN            -1
151
+  #define ONBOARD_SD_CS_PIN PC11
152
+  #define SDSS              PD2
153
+  #define SD_DETECT_PIN     -1
154
+#endif

Laddar…
Avbryt
Spara