-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial BTT SKR Mini E3 V2 support #18088
Initial BTT SKR Mini E3 V2 support #18088
Conversation
@thisiskeithb Nice. I should be getting my board on Monday and hope to have my Ender 3 Pro up and running again for tests. |
That'd be great. I have one coming direct from BigTreeTech, but it will likely take 1-2mos at the rate international shipping is going right now. Edit: Config is located in MarlinFirmware/Configurations#111. It's obviously not too different than the other two Mini E3 configs, but it should be "ready to go". |
@thisiskeithb I have my new board installed. I can now test with the Ender 3. Let me know what I can do to get the 2.0 board up and running. Edit: I was able to successfully compile your branch https://github.com/thisiskeithb/Marlin/tree/pr/add_skr_mini_e3_v2 with a few modifications. Tomorrow I will convert the configurations exactly to my needs. Then we will see what happens.... |
Which modifications were required? |
It would not compile until I changed this in platform.ini
Edit: I see now it was taken care with commit thisiskeithb@f402ab7 Edit1: Now getting the following error with the latest commit:
|
@thinkyhead: Do we have to Edit: I don't know why this block is being called when defining #if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
#define FLASH_EEPROM_EMULATION
#define EEPROM_PAGE_SIZE (0x800U) // 2KB
#define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
#define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB
#endif The V2 has a dedicated I2C EEPROM: // Onboard I2C EEPROM
#define I2C_EEPROM
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB Moving the I2C EEPROM code before the |
Compilation is successful when the lines are removed
Like you stated, now to figure out why it is being called in the fist place. Edit: The printer freezes while the |
Does it work if you back out the // Onboard I2C EEPROM
#define I2C_EEPROM
#undef E2END
#define E2END (0xFFF) // 4KB |
I have to go to work..... Will try later in the day. |
There's probably something up with the include order causing this to never register that both Marlin/Marlin/src/inc/Conditionals_adv.h Lines 352 to 355 in 6c99400
Edit: I could always |
I grabbed commit f7346b6 and used board version 1.2. Then I made all the necessary pin changes and added the external eeprom. No compiler error at all but no matter what I try the SHOW_BOOTSCREEN freezes. A bit frustrating..... (also because I'm no pro with Marlin coding) |
External EEPROM? Doesn’t that board already have an EEPROM built in? |
Yep. The SKR Mini E3 V2 has an onboard EEPROM like the GTR. |
They added a AT24C23 to the board. Was my wording as "external" incorrect? |
I assumed by external you meant you wired an additional EEPROM to the board, as many do for boards without EEPROMs. |
I tried building Marlin using the changes from this PR plus your configuration PR, but I got the EEPROM error as above which prevented it from building successfully. I tried the workaround of adding I pulled everything from the official BTT repo, and that was able to build and load onto my printer without issue. It is hard to say exactly what the differences are between this PR and the BTT repo that cause the issue. I found that the BTT repo is based off commit 27c281e which was March 22, so a fair bit of things have changed since then, including EEPROM and SDCARD handling/configs. Looking at the diff between commit 27c281e and the BTT repo shows exactly what BTT changed to get Marlin working, but I can't figure out how to apply that to more recent versions. As of now I'm at a loss, I've tried dozens of different firmware builds to no avail. For now I'm going to stick with my branch off of commit 27c281e with BTT's fixes (pins/boards) and your configuration. The only part I had to pull from BTT's configuration was the slave addresses - without that, my y-axis movement was essentially compressed to a few centimeters - my Benchy was under 1cm wide (x-axis was fine, though). Once I applied that change I was good to go. Let me know if I can help or test. |
@JeremyKennedy I did it very similar as you however I haven't gotten to the point where I can print. Right now I'm stuck where I can't home the Z-axis. I'm using a 3D-Touch with my setup. Could you please post your configs (even though you might not a level sensor) so I can take a look at your settings. |
I tried to make the V2 pins fit recent Marlin changes & not end up repeating the same pin definitions, but I'm not sure why it's not working as expected.
Thanks for the note. I've updated the config to include those changes. Edit: I also ordered a V2 board off Amazon today so I can debug this locally. |
Well, never trust a manufacturer and the configs they provide. Got my 3DTouch sorted now by having to edit the pins_BTT_SKR_MINI_E3.h file. I thought I had a DOA board. I can now continue.... |
Which edits did you have to make? |
For some reason only Z_STOP_PIN is recognized.
|
Did you enable |
In what config as I can't find that declaration? |
Search |
Thanks Keith but I'm using https://github.com/bigtreetech/BIGTREETECH-SKR-mini-E3/tree/master/firmware/V2.0/Marlin-2.0.x-SKR-mini-E3-V2.0 for now so that I have a working printer and know the new board is working. |
@JeremyKennedy See my edit with the proper place to add If it works, thank @pkilar for finding it. If it doesn't work, blame someone other than me :) |
Ha, I deleted my comment after seeing yours and realizing it's probably more complicated than I expected! But after seeing this latest one, maybe I can try playing around with it. |
Code that wants to access the EEPROM should be calling |
Removed
my Ender starts properly now. I really want to start using the new board ;) |
Ah, removed the ones you had added… Gotcha. |
|
This code is setting Marlin/Marlin/src/inc/Conditionals_adv.h Lines 352 to 355 in 7628895
|
This would thus be occurring in a pins file. Some pins files include other pins files. So, if one of the pins file includes another pins file, and both pins files want to provide an EEPROM type, then both pins files need to first check |
Alright. I’m still waiting for my board so if someone can confirm that onboard EEPROM doesn’t cause lockups after recent patches, that’d be helpful. |
Good news everyone, compilation was error free and the printer now boots up as expected 👍 Out of curiosity; Is there some way to find out if the "new" eeprom is being addressed? |
I can also confirm that Marlin builds on the latest 2.0 bugfix commit without any code changes! Thanks everyone all for the work on this. |
Can confirm that this will work (As in not lock up). Delta configuration seems to be broken though. |
What delta configuration? This PR was for the SKR Mini E3 V2.0 which is for an Ender-3. |
Micromake D1; I changed the settings in configuration.h and configuration_adv.h to delta settings according to my previous configuration.h and it appears that one of the steppers is moving significantly more than the others. Also compared my config to working Delta configs for SKR mini 1.2 and 1.3 from other people and found no major differences. It is possibly an error on my end but I am still investigating; if anybody has a Delta that they can try to plug the 2.0 into that would be great Attached is a video documenting this behaviour (Commands sent are: G91, G1 X0 Y0 Z10, G1 X0 Y0 Z-10). The stepper that is moving significantly more is stepper output X in the configuration, and I have verified that this behaviour persists and is tied to the stepper output rather than the physical stepper itself. See here for my configuration files. |
I'd recommend joining the Marlin Discord or posting in one of the other resources listed here. |
I have found another issue over the last couple of days with the new V2 board. I have tried this over multiple branches and no change at all. with the z probe offset set to -1.89 ( which should be bang on based from baby stepping value ) I still need to baby step no matter what. I have re-flashed firmware now over 20 times, and used M502 and going between branches. I even changed my z probe offset to -1.78 ( should now be double the amount away ) but no, still baby stepping is required to +0.11 its like it is completely ignoring the eeprom settings ( strangely just the z as x and y dont seem to be a problem ) is there a way I can completely wipe the board and eeprom ? or is there a way I can burn a boot loader and do it the old fashioned way? this has been over a week now and even when doing initialise eprom, restore defaults nothing works. about to send it back to china |
Saving/recalling to EEPROM works fine on my V2 using the latest |
Been using mine for over a week, constantly doing updates and have not encountered your issue. You could deactivate the "external" eeprom on the board and use the chips CPU eeprom and check what happens. |
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Description
Initial SKR Mini E3 V2 support. I don't have one on hand yet, so I marked this PR as draft so it can be tested.
BigTreeTech changed two pin numbers in the EXP1 connector, but I tried to keep this PR "DRY" since
pins_BTT_SKR_MINI_E3.h
still contains most of the correct pins. If there's a better way to handle this, like moving the EXP pins to their respective SKR Mini E3 pins files, that would be fine.To-do:
E2END
EEPROM method toMARLIN_EEPROM_SIZE
I2C_EEPROM
in pins file still returnsNO_EEPROM_SELECTED
/FLASH_EEPROM_EMULATION
. Likely a file include order issue.I2C_EEPROM
causes lockup on boot with latest Marlin/after commit 5f7a759. Using emulated EEPROM works fine.Benefits
SKR Mini E3 V2 support.
Related Issues
V2 config is marked as draft & ready for testing/review: MarlinFirmware/Configurations#111