BigTreeTech SKR Pro V1.1 or V1.2; Adding a EEPROM

Introduction: BigTreeTech SKR Pro V1.1 or V1.2; Adding a EEPROM

This instructable has been updated to include the BigTreeTech EEPROM module and the current version of Marlin [2.0.7.x].

This Instructable is for adding an I2C EEPROM module to the BTT SKR Pro V1.1 or V1.2 to utilize EEPROM storage within Marlain 2.0.7.x.

There are other ways to emulate EEPROM storage via flash storage in the ARM processor or using an SD card.

As the Marlain firmware gets larger or more options are enabled, this may cause running out of flash storage for both the firmware and M500 storage; I have also been told that when you flash firmware to the board, it wipes out the area where the settings are stored, this addition would not be in danger of those issues.

If using an SD card for EEPROM emulation, then making sure the card stays with the printer is vital; most of us have more than one printer and have a ton of SD cards that could get mixed up.

If your SKR Pro dies on you or gets damaged, this module can be moved to the new board with all of your printer settings intact.

Step 1: Parts Needed

The parts list is short; you may already have the jumpers.

1 - EEPROM data module AT24C256, I am using the RobotDny EEPROM Data Module - AT24C256, others can be used, but this instructable will cover using this module.

For all modules but the BigTreeTech: 4 individual jumpers female-to-female, the one shown in the photo is a multiple jumper cable that individuals can be pulled off.

Note here is two others that can be used:

Step 2: Setting the I2C Address on the EEPROM Module

1st we need to set the address on the I2C bus to the default that Marlain uses.

  • The RobotDny EEPROM Data Module on this module setting the 1 & 2 micro jumper switches to on will set it to be 0x50 address.
  • The NOYITO-AT24C256-EEPROM-Memory-Interface is already set for a 0x50 I2C address.
  • The Comimark-AT24C256-Interface-Storage-Arduino, set all jumpers next to the IC (as set in the image); this will set the I2C address to a 0x50 and disable write-protect.
  • The BigTreeTech EEPROM module is already set for a 0x50 I2C address.

Step 3: Wiring the EEPROM Module to the BTT SKR Pro V1.1

RobotDny EEPROM Data Module, NOYITO-AT24C256-EEPROM-Memory-Interface, & Comimark-AT24C256-Interface-Storage-Arduino; we need four female-to-female jumpers.

For the BigTreeTech EEPROM module, the switch settings need to match what is shown in the photo and use the ribbon cable included with the module.

Wire as shown in the diagram for the module you are using.

Step 4: Code Changes in Marlin 2.0.x, Updated for 2.0.7.x

  • Code changes to Configuration.h - match these lines of code under the Additional Features section EEPROM (2.0.7.2 is it around line 1474)
    #define EEPROM_SETTINGS       // Persistent storage with M500 and M501
    //#define DISABLE_M503        // Saves ~2700 bytes of PROGMEM. Disable for release!
    #define EEPROM_CHITCHAT       // Give feedback on EEPROM commands. Disable to save PROGMEM.
    #if ENABLED(EEPROM_SETTINGS)
       //#define EEPROM_AUTO_INIT  // Init EEPROM automatically on any errors.
    #endif
    #define I2C_EEPROM
    #ifdef MARLIN_EEPROM_SIZE
       #undef MARLIN_EEPROM_SIZE<br>#endif
    // uncomment the size of EEPROM you are using.
    #define MARLIN_EEPROM_SIZE 0x7FFF // EEPROM end address AT24C256 (32kB)
    //#define MARLIN_EEPROM_SIZE 0x3FFF // EEPROM end address AT24C128 (16kB)
    //#define MARLIN_EEPROM_SIZE 0x1FFF // EEPROM end address AT24C64 (8kB)
    //#define MARLIN_EEPROM_SIZE 0x0FFF // EEPROM end address AT24C32 (4kB)

Step 5: Compile Marlin 2.0.x; Revised for 2.0.7.x

Compile and load your firmware.

After starting the SKR Pro up, connect with your slicer to send commands to the board.

Send an M503 and copy the output to notepad.

Select one of the parameters to change for testing your new EEPROM.

I used the M92 E setting, sent an M92 E24 to the board.

Send an M503 to see if the setting took hold; if so, then send an M501; and the value doesn't match, then great.

The M503 gets the current machine settings, and the M501 retrieves what is stored in the EEPROM.

Send an M500.

You should get a response on the bytes/bits saved and a CRC.

Power down the board for a few, then power it back up.

Connect back up, send an M501, and check the set value for M92 E; if it matches what you set it for, then congrats.

Now return the set value you copied to notepad, send an M92 E with the original value. Send an M500 to save.

Do one last M503 and check that the M92 E value is set.

You can also send an M504 command 'Validate EEPROM contents' you should get this response EEPROM OK

3 People Made This Project!

Recommendations

  • First Time Author Contest

    First Time Author Contest
  • Fandom Contest

    Fandom Contest
  • Backyard Contest

    Backyard Contest

9 Comments

0
Loadmaster 5
Loadmaster 5

Question 7 months ago on Step 5

Hello and thanks for posting this. I have a BTT Skr Pro v1.2 and I am connected to a Tevo Little Monster Delta. Following the instructions I am getting a compiling error. I am no expert at this. I know enough to be dangerous. I am wondering if the Delta bed level process is messing things as there might be memory set for EEPROM. My guess. Any suggestions are welcomed. Thanks! Oh, bugfix Marlin is in use.

BTT SKR Pro in a Tevo Little Monster 1 EEProm install error.png
0
pseudex
pseudex

Answer 6 months ago

It looks like two eeprom Methode are active. You should have a look in the pins file for the board (marlin/SRC/stm32f4/pins_btt_skr_pro_common.h). At line ~35 there is a #if condition which can enable the flash eeprom or SRAM eeprom. Make sure they are off.
I did define the eeprom like in the instructable and was able yo compile the code. Without the eeprom config I got sanity errors not having any eeprom selected.

0
mcguirestick1
mcguirestick1

6 months ago

Hi, Has anyone had a fix for this I have a pro v1.1 and I dont get any errors when writing to eeprom it just doesnt work. It says its written but hasent it also doesnt come back with memory space.
and if i do a M504 it comes back eeprom ok

0
zarpjj
zarpjj

7 months ago

Hello all,
Each time I try to compile Marlin firmware, I get this error

Compiling .pio\build\BIGTREE_SKR_PRO\src\src\HAL\STM32\MarlinSPI.cpp.o
Compiling .pio\build\BIGTREE_SKR_PRO\src\src\HAL\STM32\MarlinSerial.cpp.o
In file included from Marlin\src\HAL\STM32\../../inc/MarlinConfig.h:49,
from Marlin\src\HAL\STM32\HAL.cpp:28:
Marlin\src\HAL\STM32\../../inc/SanityCheck.h:2240:6: error: #error "Please select only one method of EEPROM Persistent Storage."
2240 | #error "Please select only one method of EEPROM Persistent Storage."
| ^~~~~
In file included from Marlin\src\HAL\STM32\../../inc/MarlinConfig.h:49,
from Marlin\src\HAL\STM32\HAL_SPI.cpp:25:
Marlin\src\HAL\STM32\../../inc/SanityCheck.h:2240:6: error: #error "Please select only one method of EEPROM Persistent Storage."
2240 | #error "Please select only one method of EEPROM Persistent Storage."
| ^~~~~
In file included from Marlin\src\HAL\STM32\../../inc/MarlinConfig.h:49,
from Marlin\src\HAL\STM32\MarlinSerial.cpp:21:
Marlin\src\HAL\STM32\../../inc/SanityCheck.h:2240:6: error: #error "Please select only one method of EEPROM Persistent Storage."
2240 | #error "Please select only one method of EEPROM Persistent Storage."
| ^~~~~
*** [.pio\build\BIGTREE_SKR_PRO\src\src\HAL\STM32\HAL.cpp.o] Error 1
*** [.pio\build\BIGTREE_SKR_PRO\src\src\HAL\STM32\MarlinSerial.cpp.o] Error 1

I have the BTT SKR Pro V1.1 controller board with this code in configuration.h :
/**
* EEPROM
*
* Persistent storage to preserve configurable settings across reboots.
*
* M500 - Store settings to EEPROM.
* M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes)
* M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.)
*/
#define EEPROM_SETTINGS // Persistent storage with M500 and M501
#//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

and this code in pins_BTT_SKR_PRO_common.

//
i2c EEPROM
//
#define I2C_EEPROM
#ifdef E2END
#undef E2END
#endif
#define E2END0x7FFF // EEPROM end address AT24C256 (32kB)

I could not find what is wrong and therfore I can compile Marlin and not use my I2C_EEPROM module.

I have Marlin Bugfix 2.0.7.2.

Please help if you can

THX

Zarpyj
0
MananC1
MananC1

Question 1 year ago

fixed now on marlin 2.0.7
I have AT24C256 I2C EEPROM Memory Module
After ABL it shows "EEPROM datasize error"
I also try M502 and M500 to clear EEPROM but after M500 It shows "error writing to EEPROM"
How to fix it

IMG_20200311_170119861~2.jpgIMG_20200311_140520166.jpgIMG_20200311_134423900.jpg
0
MrAlko.
MrAlko.

Answer 1 year ago

Try M502, M500, M501 and reboot

0
MananC1
MananC1

Reply 9 months ago

thank you it works now on marlin bugfix 2.0.7

0
lisov.rom
lisov.rom

1 year ago

Good day!
Did everything as written here. With the command M500 issues echo:Error writing to EEPROM!. I can’t understand what’s the matter. Firmware Marlin-2.0.5.3.
Help me figure it out.

0
ipsendk
ipsendk

1 year ago

Are I2C pins already defined in the main branch of Marlin-2.0-bugfix ?