Browse Source

Alfawise Flash EEPROM, Z Servo Probe (#14877)

Tanguy Pruvot 6 years ago
parent
commit
4cc103958e

+ 30
- 15
Marlin/src/pins/stm32/pins_LONGER3D_LK.h View File

94
 #define LED_PIN            PC2   // pin 17
94
 #define LED_PIN            PC2   // pin 17
95
 
95
 
96
 //
96
 //
97
-// PWM
97
+// PWM for a servo probe
98
+// Other servo devices are not supported on this board!
98
 //
99
 //
99
-#define SERVO0_PIN         PD13  // Open drain PWM pin on the V0G (GND or floating 5V)
100
-#define SERVO0_PWM_OD            // Comment this if using PE5
100
+#if HAS_Z_SERVO_PROBE
101
+  #define SERVO0_PIN       PD13  // Open drain PWM pin on the V0G (GND or floating 5V)
102
+  #define SERVO0_PWM_OD          // Comment this if using PE5
101
 
103
 
102
-//#define SERVO0_PIN       PE5   // Pulled up PWM pin on the V08 (3.3V or 0)
104
+  //#define SERVO0_PIN     PE5   // Pulled up PWM pin on the V08 (3.3V or 0)
105
+  //#undef Z_MAX_PIN             // Uncomment if using ZMAX connector (PE5)
106
+#endif
103
 
107
 
104
 /**
108
 /**
105
  * Note: Alfawise screens use various TFT controllers. Supported screens
109
  * Note: Alfawise screens use various TFT controllers. Supported screens
139
 #endif
143
 #endif
140
 
144
 
141
 //
145
 //
142
-// SPI1 (EEPROM W25Q64 + DAC OUT)
146
+// Persistent Storage
147
+// If no option is selected below the SD Card will be used
143
 //
148
 //
149
+//#define SPI_EEPROM
150
+#define FLASH_EEPROM_EMULATION
151
+
144
 #undef E2END
152
 #undef E2END
145
-#define E2END              0x7FF // EEPROM end address (reserve 2kB on sd/sram, real spi one is 8MB/64Mbits)
146
-/*
147
-#define SPI_EEPROM         1   // If commented this will create a file on the SD card as a replacement
148
-#define SPI_CHAN_EEPROM1   1
149
-#define SPI_EEPROM1_CS     PC5 // pin 34
150
-
151
-//#define EEPROM_SCK  BOARD_SPI1_SCK_PIN   // PA5 pin 30
152
-//#define EEPROM_MISO BOARD_SPI1_MISO_PIN  // PA6 pin 31
153
-//#define EEPROM_MOSI BOARD_SPI1_MOSI_PIN  // PA7 pin 32
154
-*/
153
+#if ENABLED(SPI_EEPROM)
154
+  // SPI1 EEPROM Winbond W25Q64 (8MB/64Mbits)
155
+  #define SPI_CHAN_EEPROM1   1
156
+  #define SPI_EEPROM1_CS     PC5   // pin 34
157
+  #define EEPROM_SCK  BOARD_SPI1_SCK_PIN    // PA5 pin 30
158
+  #define EEPROM_MISO BOARD_SPI1_MISO_PIN   // PA6 pin 31
159
+  #define EEPROM_MOSI BOARD_SPI1_MOSI_PIN   // PA7 pin 32
160
+  #define EEPROM_PAGE_SIZE   0x1000U        // 4KB (from datasheet)
161
+  #define E2END ((16 * EEPROM_PAGE_SIZE)-1) // Limit to 64KB for now...
162
+#elif ENABLED(FLASH_EEPROM_EMULATION)
163
+  // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
164
+  #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE)
165
+  #define EEPROM_PAGE_SIZE     (0x800U)     // 2KB, but will use 2x more (4KB)
166
+  #define E2END (EEPROM_PAGE_SIZE - 1)
167
+#else
168
+  #define E2END (0x7FFU) // On SD, Limit to 2KB, require this amount of RAM
169
+#endif

+ 7
- 7
config/examples/Alfawise/U20/Configuration.h View File

1379
 #if ENABLED(LEVEL_BED_CORNERS)
1379
 #if ENABLED(LEVEL_BED_CORNERS)
1380
   #define LEVEL_CORNERS_INSET 30    // (mm) An inset for corner leveling
1380
   #define LEVEL_CORNERS_INSET 30    // (mm) An inset for corner leveling
1381
   #define LEVEL_CORNERS_Z_HOP  4.0  // (mm) Move nozzle up before moving between corners
1381
   #define LEVEL_CORNERS_Z_HOP  4.0  // (mm) Move nozzle up before moving between corners
1382
-  #define LEVEL_CORNERS_HEIGHT 0.0  // (mm) Z height of nozzle at leveling points
1383
-  #define LEVEL_CENTER_TOO        // Move to the center after the last corner
1382
+  #define LEVEL_CORNERS_HEIGHT 0.2  // (mm) Z height of nozzle at leveling points
1383
+  #define LEVEL_CENTER_TOO          // Move to the center after the last corner
1384
 #endif
1384
 #endif
1385
 
1385
 
1386
 /**
1386
 /**
1418
 #endif
1418
 #endif
1419
 
1419
 
1420
 // Homing speeds (mm/m)
1420
 // Homing speeds (mm/m)
1421
-#define HOMING_FEEDRATE_XY (20*60)
1421
+#define HOMING_FEEDRATE_XY (40*60)
1422
 #define HOMING_FEEDRATE_Z  (7*60)
1422
 #define HOMING_FEEDRATE_Z  (7*60)
1423
 
1423
 
1424
 // Validate that endstops are triggered on homing moves
1424
 // Validate that endstops are triggered on homing moves
2151
 
2151
 
2152
   #if ENABLED(TS_V11)
2152
   #if ENABLED(TS_V11)
2153
     // Alfawise U20 ILI9341 2.8 TP Ver 1.1 / Green PCB on the back of touchscreen
2153
     // Alfawise U20 ILI9341 2.8 TP Ver 1.1 / Green PCB on the back of touchscreen
2154
-    #define XPT2046_X_CALIBRATION 11605
2155
-    #define XPT2046_Y_CALIBRATION 9091
2156
-    #define XPT2046_X_OFFSET -24
2157
-    #define XPT2046_Y_OFFSET -17
2154
+    #define XPT2046_X_CALIBRATION   11605
2155
+    #define XPT2046_Y_CALIBRATION   9091
2156
+    #define XPT2046_X_OFFSET       -24
2157
+    #define XPT2046_Y_OFFSET       -17
2158
   #endif
2158
   #endif
2159
 
2159
 
2160
   #if ENABLED(TS_V12)
2160
   #if ENABLED(TS_V12)

+ 2
- 1
config/examples/Alfawise/U20/Configuration_adv.h View File

517
 #define X_HOME_BUMP_MM 5
517
 #define X_HOME_BUMP_MM 5
518
 #define Y_HOME_BUMP_MM 5
518
 #define Y_HOME_BUMP_MM 5
519
 #define Z_HOME_BUMP_MM 2
519
 #define Z_HOME_BUMP_MM 2
520
-#define HOMING_BUMP_DIVISOR { 2, 2, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
520
+#define HOMING_BUMP_DIVISOR { 4, 4, 4 }  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
521
 //#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
521
 //#define QUICK_HOME                     // If homing includes X and Y, do a diagonal move initially
522
 //#define HOMING_BACKOFF_MM { 2, 2, 2 }  // (mm) Move away from the endstops after homing
522
 //#define HOMING_BACKOFF_MM { 2, 2, 2 }  // (mm) Move away from the endstops after homing
523
 
523
 
650
 
650
 
651
 #if EITHER(ULTIPANEL, EXTENSIBLE_UI)
651
 #if EITHER(ULTIPANEL, EXTENSIBLE_UI)
652
   #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 60 } // Feedrates for manual moves along X, Y, Z, E from panel
652
   #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 60 } // Feedrates for manual moves along X, Y, Z, E from panel
653
+  #define SHORT_MANUAL_Z_MOVE 0.025 // (mm) Smallest manual Z move (< 0.1mm)
653
   #if ENABLED(ULTIPANEL)
654
   #if ENABLED(ULTIPANEL)
654
     #define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position"
655
     #define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position"
655
     #define ULTIPANEL_FEEDMULTIPLY  // Encoder sets the feedrate multiplier on the Status Screen
656
     #define ULTIPANEL_FEEDMULTIPLY  // Encoder sets the feedrate multiplier on the Status Screen

Loading…
Cancel
Save