STM32F103VE has 512K Flash EEPROM (#17565)
This commit is contained in:
parent
d353d67a34
commit
847ea583f6
10 changed files with 26 additions and 26 deletions
|
@ -52,7 +52,7 @@
|
|||
// ------------------------
|
||||
|
||||
#ifndef STM32_FLASH_SIZE
|
||||
#ifdef MCU_STM32F103RE
|
||||
#if defined(MCU_STM32F103RE) || defined(MCU_STM32F103VE)
|
||||
#define STM32_FLASH_SIZE 512
|
||||
#else
|
||||
#define STM32_FLASH_SIZE 256
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
|
||||
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
|
||||
#define EEPROM_START_ADDRESS uint32(0x8000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
|
||||
#define EEPROM_PAGE_SIZE (0x800U) // 2KB
|
||||
#define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
|
||||
#undef E2END
|
||||
#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
|
||||
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
|
||||
#define EEPROM_START_ADDRESS uint32(0x8000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
|
||||
#define EEPROM_PAGE_SIZE (0x800U) // 2KB
|
||||
#define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
|
||||
#undef E2END
|
||||
#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
|
||||
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#define EEPROM_PAGE_SIZE (0x800) // 2KB
|
||||
#define EEPROM_START_ADDRESS uint32(0x8000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
|
||||
#define EEPROM_PAGE_SIZE (0x800U) // 2KB
|
||||
#define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
|
||||
#define E2END (EEPROM_PAGE_SIZE - 1)
|
||||
|
||||
//
|
||||
|
|
|
@ -39,10 +39,11 @@
|
|||
// Flash EEPROM Emulation
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
|
||||
#define EEPROM_START_ADDRESS uint32(0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE)
|
||||
#define EEPROM_PAGE_SIZE (0x800U) // 2KB
|
||||
#define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
|
||||
#undef E2END
|
||||
#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
#define DISABLE_JTAG
|
||||
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
|
||||
#define EEPROM_START_ADDRESS uint32(0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE)
|
||||
#define EEPROM_PAGE_SIZE (0x800U) // 2KB
|
||||
#define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
|
||||
#undef E2END
|
||||
#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB
|
||||
|
||||
|
|
|
@ -43,10 +43,10 @@
|
|||
// Enable EEPROM Emulation for this board, so that we don't overwrite factory data
|
||||
|
||||
//#define I2C_EEPROM // AT24C64
|
||||
//#define E2END 0x7FFF // 64KB
|
||||
//#define E2END 0x7FFFUL // 64KB
|
||||
//#define FLASH_EEPROM_EMULATION
|
||||
//#define E2END 0xFFF // 4KB
|
||||
//#define E2END uint32(EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE * 2) - 1)
|
||||
//#define E2END 0xFFFUL // 4KB
|
||||
//#define E2END (EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE) * 2UL - 1UL)
|
||||
//#define EEPROM_CHITCHAT
|
||||
//#define DEBUG_EEPROM_READWRITE
|
||||
|
||||
|
|
|
@ -159,11 +159,11 @@
|
|||
#define EEPROM_MISO BOARD_SPI1_MISO_PIN // PA6 pin 31
|
||||
#define EEPROM_MOSI BOARD_SPI1_MOSI_PIN // PA7 pin 32
|
||||
#define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet)
|
||||
#define E2END ((16 * EEPROM_PAGE_SIZE)-1) // Limit to 64KB for now...
|
||||
#define E2END (16UL * (EEPROM_PAGE_SIZE) - 1UL) // Limit to 64KB for now...
|
||||
#elif ENABLED(FLASH_EEPROM_EMULATION)
|
||||
// SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
|
||||
#define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE)
|
||||
#define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB)
|
||||
#define EEPROM_PAGE_SIZE (0x800U) // 2KB
|
||||
#define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
|
||||
#define E2END (EEPROM_PAGE_SIZE - 1)
|
||||
#else
|
||||
#define E2END (0x7FFU) // On SD, Limit to 2KB, require this amount of RAM
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
// 2K in a AT24C16N
|
||||
#define EEPROM_PAGE_SIZE (uint16)0x800 // 2048
|
||||
#define EEPROM_START_ADDRESS ((uint32)(0x8000000 + 512 * 1024 - 2 * EEPROM_PAGE_SIZE))
|
||||
#define EEPROM_PAGE_SIZE (0x800U) // 2KB
|
||||
#define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
|
||||
#define E2END (EEPROM_PAGE_SIZE - 1)
|
||||
|
||||
//
|
||||
|
|
|
@ -463,9 +463,9 @@ src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
|||
platform = ststm32
|
||||
board = genericSTM32F103VE
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
${common.build_flags} -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++14 -MMD -ffunction-sections -fdata-sections -nostdlib
|
||||
-DBOARD_generic_stm32f103v -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1
|
||||
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
|
||||
${common.build_flags} -std=gnu++14 -ffunction-sections -fdata-sections -nostdlib -MMD
|
||||
-DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v
|
||||
-DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
|
||||
build_unflags = -std=gnu++11
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
|
||||
lib_ignore = Adafruit NeoPixel, SPI
|
||||
|
@ -478,8 +478,7 @@ upload_protocol = serial
|
|||
platform = ststm32
|
||||
board = genericSTM32F103VE
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
${common.build_flags} -std=gnu++14 -USERIAL_USB
|
||||
-DSTM32F1xx -DU20 -DTS_V12
|
||||
${common.build_flags} -std=gnu++14 -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
|
||||
build_unflags = -std=gnu++11 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
|
||||
|
@ -492,7 +491,7 @@ lib_ignore = Adafruit NeoPixel, LiquidTWI2, SPI
|
|||
platform = ststm32
|
||||
board = genericSTM32F103VE
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
${common.build_flags} -std=gnu++14
|
||||
${common.build_flags} -std=gnu++14 -DMCU_STM32F103VE
|
||||
build_unflags = -std=gnu++11
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_mini.py
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
|
||||
|
@ -506,7 +505,7 @@ platform = ststm32
|
|||
board = genericSTM32F103VE
|
||||
platform_packages = tool-stm32duino
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
${common.build_flags} -std=gnu++14 -DHAVE_SW_SERIAL -DSS_TIMER=4
|
||||
${common.build_flags} -std=gnu++14 -DMCU_STM32F103VE -DHAVE_SW_SERIAL -DSS_TIMER=4
|
||||
build_unflags = -std=gnu++11
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano.py
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
|
||||
|
|
Reference in a new issue