Browse Source

🐛 Fix Longer3D SDSS / SD_SS (#22444)

Tanguy Pruvot 4 years ago
parent
commit
296d0d495c
No account linked to committer's email address
1 changed files with 12 additions and 1 deletions
  1. 12
    1
      Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h

+ 12
- 1
Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h View File

@@ -140,6 +140,10 @@
140 140
   #define TFT_BUFFER_SIZE                   3200
141 141
 #endif
142 142
 
143
+#if ENABLED(SDIO_SUPPORT)
144
+  #define SD_SS_PIN                         -1    // else SDSS set to PA4 in M43 (spi_pins.h)
145
+#endif
146
+
143 147
 /**
144 148
  * Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer
145 149
  * mixed up MOSI and MISO pins. SPI is managed in SW, and needs pins
@@ -148,7 +152,7 @@
148 152
 #if NEED_TOUCH_PINS
149 153
   #define TOUCH_CS_PIN                      PB12  // pin 51 SPI2_NSS
150 154
   #define TOUCH_SCK_PIN                     PB13  // pin 52
151
-  #define TOUCH_MOSI_PIN                    PB14  // pin 53
155
+  #define TOUCH_MOSI_PIN                    PB14  // pin 53 (Inverted MOSI/MISO = No HW SPI2)
152 156
   #define TOUCH_MISO_PIN                    PB15  // pin 54
153 157
   #define TOUCH_INT_PIN                     PC6   // pin 63 (PenIRQ coming from ADS7843)
154 158
 #endif
@@ -159,6 +163,7 @@
159 163
 //
160 164
 #if NO_EEPROM_SELECTED
161 165
   //#define SPI_EEPROM
166
+  //#define HAS_SPI_FLASH                      1  // need MARLIN_DEV_MODE for M993/M994 eeprom backup tests
162 167
   #define FLASH_EEPROM_EMULATION
163 168
 #endif
164 169
 
@@ -171,6 +176,12 @@
171 176
   #define EEPROM_MOSI        BOARD_SPI1_MOSI_PIN  // PA7 pin 32
172 177
   #define EEPROM_PAGE_SIZE               0x1000U  // 4KB (from datasheet)
173 178
   #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE)   // Limit to 64KB for now...
179
+#elif HAS_SPI_FLASH
180
+  #define SPI_FLASH_SIZE                0x40000U  // limit to 256KB (M993 will reboot with 512)
181
+  #define W25QXX_CS_PIN                     PC5
182
+  #define W25QXX_MOSI_PIN                   PA7
183
+  #define W25QXX_MISO_PIN                   PA6
184
+  #define W25QXX_SCK_PIN                    PA5
174 185
 #elif ENABLED(FLASH_EEPROM_EMULATION)
175 186
   // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
176 187
   #define EEPROM_PAGE_SIZE     (0x800U)           // 2KB

Loading…
Cancel
Save