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
   #define TFT_BUFFER_SIZE                   3200
140
   #define TFT_BUFFER_SIZE                   3200
141
 #endif
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
  * Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer
148
  * Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer
145
  * mixed up MOSI and MISO pins. SPI is managed in SW, and needs pins
149
  * mixed up MOSI and MISO pins. SPI is managed in SW, and needs pins
148
 #if NEED_TOUCH_PINS
152
 #if NEED_TOUCH_PINS
149
   #define TOUCH_CS_PIN                      PB12  // pin 51 SPI2_NSS
153
   #define TOUCH_CS_PIN                      PB12  // pin 51 SPI2_NSS
150
   #define TOUCH_SCK_PIN                     PB13  // pin 52
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
   #define TOUCH_MISO_PIN                    PB15  // pin 54
156
   #define TOUCH_MISO_PIN                    PB15  // pin 54
153
   #define TOUCH_INT_PIN                     PC6   // pin 63 (PenIRQ coming from ADS7843)
157
   #define TOUCH_INT_PIN                     PC6   // pin 63 (PenIRQ coming from ADS7843)
154
 #endif
158
 #endif
159
 //
163
 //
160
 #if NO_EEPROM_SELECTED
164
 #if NO_EEPROM_SELECTED
161
   //#define SPI_EEPROM
165
   //#define SPI_EEPROM
166
+  //#define HAS_SPI_FLASH                      1  // need MARLIN_DEV_MODE for M993/M994 eeprom backup tests
162
   #define FLASH_EEPROM_EMULATION
167
   #define FLASH_EEPROM_EMULATION
163
 #endif
168
 #endif
164
 
169
 
171
   #define EEPROM_MOSI        BOARD_SPI1_MOSI_PIN  // PA7 pin 32
176
   #define EEPROM_MOSI        BOARD_SPI1_MOSI_PIN  // PA7 pin 32
172
   #define EEPROM_PAGE_SIZE               0x1000U  // 4KB (from datasheet)
177
   #define EEPROM_PAGE_SIZE               0x1000U  // 4KB (from datasheet)
173
   #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE)   // Limit to 64KB for now...
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
 #elif ENABLED(FLASH_EEPROM_EMULATION)
185
 #elif ENABLED(FLASH_EEPROM_EMULATION)
175
   // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
186
   // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
176
   #define EEPROM_PAGE_SIZE     (0x800U)           // 2KB
187
   #define EEPROM_PAGE_SIZE     (0x800U)           // 2KB

Loading…
Cancel
Save