-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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] POWER_LOSS_RECOVERY requires SD Card inserted at boot #24293
Comments
so this is perhaps "Behaves Correctly" as I found the following: in cardreader.cpp:
we're setting 'stat' = to true/false based on IS_SD_INSERTED() function call. later in the same function we have an if statement that checks if stat is true that does the attempt to mount and if not if SD_DETECT pin exists, release() the card :
we then indicate int he UI using ui.media_changed and then we check again for stat being false. if stat is false we return out of the function:
so looking at IS_SD_INSERTED in cardreader.h:
all but the bottom section is disabled (dimmed) for my config, critically the PIN_EXISTS(SD_DETECT) section. The only section remains is the hard-set to "true" so IS_SD_INSERTED() is always returning true causing the behavior. It seems SKR1.3 board perhaps doesn't have SD_DETECT pin available, so IS_SD_INSERTED() will always return true, causing this behavior. So perhaps expected? |
That's what I'm thinking. However it doesn't seem that a timeout actually happens instead the machine is left in an unusable state. |
Please download |
merging bugfix-2.1.x into my personal repo to see if this reproduces. will comment here with results. |
Are you still running in to this? I am seeing the same thing with the released version of 2.1. |
|
Apologies in the delay in checking this against bugfix-2.1.x. Unexpected medical issues, suck. Regardless, I was able to merge bugfix-2.1.x into my personal repo for this machine and can confirm that the issue described above is now resolved. I have migrated my configs including POWER_LOSS_RECOVERY enabled, and tested various states of SD Card inserted and not inserted at boot up and at no point is the unit becoming unresponsive as before. I like to keep my hardware at more stable releases (usually LTS) and usually move away from bugfix build trains. Is there a specific thing to watch out for, to see when these fixes get put onto 2.1 mainline? |
PRs sent to |
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. |
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
Enabled POWER_LOSS_RECOVERY, flagged as incompatible with SD_IGNORE_AT_STARTUP option. Disabled SD_IGNORE_AT_STARTUP option, and booted the unit without an SD card inserted.
The unit becomes unresponsive when booting without an SD card, having significant (or entirely frozen) menu UI, and sending gcode commands cause extremely slow or no response.
Connecting to the serial console in the failed state reveals continual spam of "No SD Card" in the terminal. The machine appears to be looping attempts to mount the SD card media (M21 perhaps)
Bug Timeline
This started once I enabled POWER_LOSS_RECOVERY
Expected behavior
It seems that the FW should more gracefully handle the lack of an SD card at boot when SD_IGNORE_AT_STARTUP is disabled. Looping and making the unit unresponsive does not seem like the intended behavior.
With SD_IGNORE_AT_STARTUP disabled, and no SD card in slot, Marlin should attempt to mount the SD card once, and then stop re-trying. Optionally, if POWER_LOSS_RECOVERY is enabled, this would be the time to warn the user via UI that power loss recovery is unavailable due to no SD card. (and to insert one)
Further, MarlinFW source should indicate this behavior in the documentation for POWER_LOSS_RECOVERY
Actual behavior
MarlinFW continually attempts to mount the SD card media causing an unresponsive unit.
Steps to Reproduce
Enable POWER_LOSS_RECOVERY
Disable SD_IGNORE_AT_STARTUP (advised to if one attempts to build with both of these on)
Build and flash unit
Remove SD card
Reboot unit (power off/power on)
Version of Marlin Firmware
2.0.9.4
Printer model
Creality Ender 3 - Pro
Electronics
SKR 1.3
Add-ons
BLTouch
Bed Leveling
ABL Bilinear mesh
Your Slicer
Cura
Host Software
Other (explain below)
Other things to include
Configuration.h
andConfiguration_adv.h
.M111 S247
for maximum logging.)Additional information & file uploads
SerialOutput.txt
Configs.zip
The text was updated successfully, but these errors were encountered: