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

Toggle for SD mount on boot #20099

Merged
merged 11 commits into from
Nov 11, 2020
Merged

Conversation

Kannix2005
Copy link
Contributor

Requirements

Description

SD Card mounting on boot can be disabled. This is useful if you regularily want to flash a firmware via internal SD-Card Reader with the FirmwareUpdater Plugin in Octoprint. The mounting of the SD on a RPi requires you to have the SD card not mounted in Marlin.

Benefits

No need to release the media every time the printer reboots.

Configurations

Configuration.h adapted and pushed as well.

Related Issues

@Kannix2005 Kannix2005 changed the title Sd Toggle for SD mount on boot Nov 11, 2020
@rhapsodyv
Copy link
Member

When the board have MSC support (to allow it mount on the computer), it automatically disable SD detect, making it don't mount on boot.

/**
 * Override the SD_DETECT_STATE set in Configuration_adv.h
 * and enable sharing of onboard SD host drives (all platforms but AGCM4)
 */
#if ENABLED(SDSUPPORT)

  #if SD_CONNECTION_IS(ONBOARD) && DISABLED(NO_SD_HOST_DRIVE) && !defined(ARDUINO_GRAND_CENTRAL_M4)
    //
    // The external SD card is not used. Hardware SPI is used to access the card.
    // When sharing the SD card with a PC we want the menu options to
    // mount/unmount the card and refresh it. So we disable card detect.
    //
    #undef SD_DETECT_PIN
    #define HAS_SHARED_MEDIA 1
  #endif

Said that, I don't know what is your issue.

@thinkyhead
Copy link
Member

When there's no SD_DETECT_PIN, Marlin will always try to mount the media at startup by pure trial-and-error.

@thinkyhead thinkyhead merged commit 6ccb4b9 into MarlinFirmware:bugfix-2.0.x Nov 11, 2020
@Kannix2005 Kannix2005 deleted the sd branch November 11, 2020 21:23
FhlostonParadise pushed a commit to FhlostonParadise/Marlin that referenced this pull request Nov 21, 2020
Kannix2005 added a commit to Kannix2005/Marlin-1 that referenced this pull request Dec 7, 2020
vgadreau pushed a commit to vgadreau/Marlin that referenced this pull request Dec 9, 2020
tharts pushed a commit to tharts/Marlin that referenced this pull request Jan 6, 2021
dpreed pushed a commit to dpreed/Marlin_2.0.x that referenced this pull request Feb 5, 2021
kpishere pushed a commit to kpishere/Marlin that referenced this pull request Feb 19, 2021
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
thinkyhead added a commit to thinkyhead/Marlin that referenced this pull request Apr 28, 2021
thinkyhead added a commit to thinkyhead/Marlin that referenced this pull request Apr 29, 2021
thinkyhead added a commit that referenced this pull request Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants