Correcting the Issue With On-board EEPROM for the BTT GTR V1.0

Introduction: Correcting the Issue With On-board EEPROM for the BTT GTR V1.0

NOTE: this has been corrected with the most current versions of Marlin.

As it is; when the I2C EEPROM is enabled and trying to save to it or initializing it will cause the board reset.

Well, I decided to try the build that BTT provided on Github with the GTR

Marlin-bugfix-2.0.x BTT_GTR_V1.0-Demo

Editing the pins_BTT_GTR_V1_0.h file

  • Removed // in front of #define I2C_EEPROM in the pins file.
  • Added this code just below;
#ifdef E2END
	#undef E2END
#endif
#define E2END 0x1FFF // EEPROM end address 24C64 (64Kb = 8KB)

Configuration.h

  • Removed // in front of #define EEPROM_SETTINGS

Complied and flashed this firmware to the GTR. Flash worked with no resetting issues.


Marlin 2.0.5.3

EEPROM failing then board reset just after.

Next, I tried an external I2C EEPROM in the I2C (J65) got the same results.

Checking files I finally came across comparing the GTR Demo Marlin from BTT and the current Marlin 2.0.5.3 and found this file under \buildroot\share\PlatformIO\variants\BIGTREE_SKR_PRO_1v1\variant.h

In the BTT Demo it has this;

//I2C Definitions
#define PIN_WIRE_SDA            PH5
#define PIN_WIRE_SCL            PH4

· In 2.0.5.3 it has this;

// I2C Definitions
#define PIN_WIRE_SDA            PB7
#define PIN_WIRE_SCL            PB6

The BTT Demo has the correct pins that are connected to the on-board EEPROM.

So in 2.0.5.3 variant.h I changed the code to the following;

// I2C Definitions
#if STM32F4X_PIN_NUM >= 176
	#define PIN_WIRE_SDA            PH5
        #define PIN_WIRE_SCL            PH4
#else
        #define PIN_WIRE_SDA            PB7
        #define PIN_WIRE_SCL            PB6
#endif

Step 1: Final Code Changes for 2.0.5.x for the BTT GTR On-board EEPROM to Work.

\buildroot\share\PlatformIO\variants\BIGTREE_SKR_PRO_1v1\variant.h

// I2C Definitions
#if STM32F4X_PIN_NUM >= 176
	#define PIN_WIRE_SDA            PH5
        #define PIN_WIRE_SCL            PH4
#else
        #define PIN_WIRE_SDA            PB7
        #define PIN_WIRE_SCL            PB6
#endif

Configuration.h

#define EEPROM_SETTINGS     // Persistent storage with M500 and M501<br>//#define DISABLE_M503        // Saves ~2700 bytes of PROGMEM. Disable for release!
#define EEPROM_CHITCHAT       // Give feedback on EEPROM commands. Disable to save PROGMEM.
#define EEPROM_BOOT_SILENT    // Keep M503 quiet and only give errors during first load
#if ENABLED(EEPROM_SETTINGS)
  //#define EEPROM_AUTO_INIT  // Init EEPROM automatically on any errors.
#endif

pins_BTT_GTR_V1_0.h

#define I2C_EEPROM
//#define SRAM_EEPROM_EMULATION                   // Use BackSRAM-based EEPROM emulation
//#define FLASH_EEPROM_EMULATION                  // Use Flash-based EEPROM emulation
#ifdef E2END
   #undef E2END
#endif
#define E2END 0x1FFF // EEPROM end address 24C64 (64Kb = 8KB)

Be the First to Share

    Recommendations

    • Maps Challenge

      Maps Challenge
    • First Time Author Contest

      First Time Author Contest
    • Backyard Contest

      Backyard Contest

    Comments

    0
    GeraldB46
    GeraldB46

    1 year ago on Step 1

    Hi do you have a video how to setup this board in marlin thx