Skip to content
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

[BUG] SKR PRO, M502 M500 twice to update EEPROM #17627

Closed
DroneMang opened this issue Apr 20, 2020 · 5 comments
Closed

[BUG] SKR PRO, M502 M500 twice to update EEPROM #17627

DroneMang opened this issue Apr 20, 2020 · 5 comments

Comments

@DroneMang
Copy link

DroneMang commented Apr 20, 2020

Bug Description

Hi,

I noticed this while setting up sensorless homing. If I create a new firmware and change the default values in the firmware and then compile, I must run M502, M500, M501 twice to see the changes. If there is an EEPROM mismatch, this also persists until the second set of M502, M500, M501.

In the SKR PRO pins file, does this have to do with the default FLASH based EEPROM? Could there be more of a description in the pins file as to how each of these options work, FLASH based and SRAM based?

My Configurations

Marlin-2.0.x.zip

Steps to Reproduce

  1. run M502, M500, M501 twice to see the changes

Expected behavior: run M502, M500, M501 once.

Actual behavior: Must run M502, M500, M501 twice to see the changes in EEPROM.

@DroneMang DroneMang changed the title M502 M500 2X Req to save new firmware into EEPROM on update, SKR PRO [BUG] M502 M500 2X Req to save new firmware into EEPROM on update, SKR PRO Apr 20, 2020
@DroneMang DroneMang changed the title [BUG] M502 M500 2X Req to save new firmware into EEPROM on update, SKR PRO [BUG] SKR PRO, M502 M500 twice to update EEPROM Apr 21, 2020
@BastR
Copy link
Contributor

BastR commented Apr 22, 2020

I have the same problem but this one has been around for months...It affects a lot of SKR PRO users, I know 3 other people who use this card and we have exactly the same problem.

Moreover and randomly, the BLT doesn't work anymore after an M502 M500 as seen in this bug report #16169

@sjasonsmith
Copy link
Contributor

I saw the same issue yesterday, with two M500 calls being required to write to the flash.

I did NOT see the issue if I added #define FLASH_EEPROM_LEVELING.

Debugging the code it appears that the command to erase the flash sector is failing, which is preventing the write from occurring. It then works on the second try. I don't know the reason for the failure the first time, I haven't debugged that far.

FLASH_EEPROM_LEVELING hides the problem, because it only erases the sector once in about 30 saves. It might still have the same issue when it does the erase, but it did not occur the one time I force it to wrap around and erase.

@sjasonsmith
Copy link
Contributor

I was about to post a pull request to fix the double-M500 issue, when I thought to test the BLTouch issue @BastR mentioned. Much to my surprise, he is correct! After writing to the flash my BLTouch stops responding.

I verified with a logic analyzer that the servo output goes to a 100% duty cycle after writing to the flash.

@DroneMang
Copy link
Author

This has now been resolved in the newest bugfix. So I am closing this. Thanks.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants