Browse Source

Robin E3D Flash-based EEPROM (#18219)

DocYester 4 years ago
parent
commit
19024306fc
No account linked to committer's email address

+ 11
- 0
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3.h View File

41
 #define ENABLE_SPI2
41
 #define ENABLE_SPI2
42
 
42
 
43
 //
43
 //
44
+// EEPROM
45
+//
46
+#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
47
+  #define FLASH_EEPROM_EMULATION
48
+  #define EEPROM_PAGE_SIZE     (0x800U) // 2KB
49
+  #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
50
+  #undef E2END
51
+  #define E2END                (EEPROM_PAGE_SIZE - 1) // 2KB
52
+#endif
53
+
54
+//
44
 // Servos
55
 // Servos
45
 //
56
 //
46
 #define SERVO0_PIN                          PA3
57
 #define SERVO0_PIN                          PA3

+ 11
- 0
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h View File

41
 #define ENABLE_SPI2
41
 #define ENABLE_SPI2
42
 
42
 
43
 //
43
 //
44
+// EEPROM
45
+//
46
+#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
47
+  #define FLASH_EEPROM_EMULATION
48
+  #define EEPROM_PAGE_SIZE     (0x800U) // 2KB
49
+  #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
50
+  #undef E2END
51
+  #define E2END                (EEPROM_PAGE_SIZE - 1) // 2KB
52
+#endif
53
+
54
+//
44
 // Servos
55
 // Servos
45
 //
56
 //
46
 #define SERVO0_PIN                          PA3
57
 #define SERVO0_PIN                          PA3

+ 1
- 1
buildroot/share/PlatformIO/ldscripts/mks_robin_e3.ld View File

1
 MEMORY
1
 MEMORY
2
 {
2
 {
3
   ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40
3
   ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40
4
-  rom (rx)  : ORIGIN = 0x08005000, LENGTH = 256K - 20K
4
+  rom (rx)  : ORIGIN = 0x08005000, LENGTH = 256K - 20K - 4K
5
 }
5
 }
6
 
6
 
7
 /* Provide memory region aliases for common.inc */
7
 /* Provide memory region aliases for common.inc */

Loading…
Cancel
Save