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] BIGTREETECH SKR 1.3 Onboard SD not working #16982

Closed
albydnc opened this issue Feb 26, 2020 · 20 comments
Closed

[BUG] BIGTREETECH SKR 1.3 Onboard SD not working #16982

albydnc opened this issue Feb 26, 2020 · 20 comments

Comments

@albydnc
Copy link

albydnc commented Feb 26, 2020

Bug Description

Hi everyone,
I've flashed my SKR v1.3 with the Marlin Bugfix 2.0.x and configured it with no issues.
Everything is working fine with USB enabling me to print via Octoprint and Simplify3D.
The problem is that the firmware can't mount the Onboard SD; following the forums I've tried to set

#define SDCARD_CONNECTION ONBOARD
#define SDSUPPORT 

with no luck.

Thank you for your help!

@ellensp
Copy link
Contributor

ellensp commented Feb 26, 2020

Please provide full configuration files.

@ellensp
Copy link
Contributor

ellensp commented Feb 26, 2020

When you have #define SDCARD_CONNECTION ONBOARD

If the operating system can see the onboard SD card as a USB drive, marlin cannot see the SD card. They are mutually exclusive.
To enable Marlin's SD card use Use the lcd menus and select "Attach Media" After this has been selected a new menu item "Print from Media" will be added to the menu. Standard gcodes such as list file contents M20 works as expected, the operating system will not be able to see the SD card.

To restore SD access to the operating system select "Release Media" on the LCD. Marlin will no longer have access to the SD card.

You can also use gcode M21 - Attach media and M22 - Release media

This works fine on my skr 1.3 on today's bugfix. .

@thinkyhead
Copy link
Member

I guess it's a "bug" that we need to document these new flags better someplace.

@ellensp
Copy link
Contributor

ellensp commented Feb 26, 2020

I am presuming it's not something else since no config files...

@albydnc
Copy link
Author

albydnc commented Feb 26, 2020

Archivio.zip
Here the configuration.
I've tried to use M22 and M21 but it always says SD card init fail

@NickTom88
Copy link

NickTom88 commented Feb 26, 2020

(EDIT: Just realized I was in ++ mode looking at the code... Sorry if this confused anyone)

So I had this issue and, for S&Gs, tried disabling the following configuration_adv

#if ENABLED(SDSUPPORT)

  // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
  // around this by connecting a push button or single throw switch to the pin defined
  // as SD_DETECT_PIN in your board's pins definitions.
  // This setting should be disabled unless you are using a push button, pulling the pin to ground.
  // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
  **_//#define SD_DETECT_INVERTED_**

Once I disabled it along with the other settings you provided, I was able to open the SD card on the controller.

@ellensp
Copy link
Contributor

ellensp commented Feb 27, 2020

Provided configuration files has //#define SDCARD_CONNECTION ONBOARD
This means the LCD SD card is active, not the Onboard SD card.
The SD on the LCD works as expected with this configuration on my skr 1.3 system.

If I enable #define SDCARD_CONNECTION ONBOARD and since this is in an additional #if HAS_SDCARD_CONNECTION clause also set #define HAS_SDCARD_CONNECTION 1. The Onboard SD also then works as expected.

NB They have set #define NO_SD_HOST_DRIVE, so you can't release SD back to operating system. (very frustrating when testing)

@dreemcatcher
Copy link

Same problem on SKR 1.1 PRO, it read card then need to install firmware but then cant initialize SD card at all.
Printer Creality CR-10 Drivers - 2208v3

@dreemcatcher
Copy link

@NickTom88
Copy link

NickTom88 commented Feb 29, 2020

This is with Ender 3 Pro and SKR 1.3. Just printed using SD card. Using above suggested settings. Also included config files this time.

Configuration_files 2.0.4.4.zip

@MikeEitel
Copy link

I try with btt skr pro 1.1 and TMC2209.
All kind of versions: lcd / onboard with sd in or out-> in 2. menue NO MEDIA

Putting sd card in lcd slot shows in 1. sceen: Media insered / removed
= Card detection works flawless

BUT in all variants i always see in 2.sceen: NO MEDIA

I can connect to printer but in no variant i can have the onboard media in pc to download the firmware.bin.

@MikeEitel
Copy link

MikeEitel commented Mar 1, 2020

Since i modified in the pin file not to check for spi lcd:

- #if SDCARD_CONNECTION == ONBOARD && !defined(HAS_SPI_LCD)
+ #if SDCARD_CONNECTION == ONBOARD

I can store eeprom and see and use gcode files off onboard sd card.
But "removing" the media is still not switching the sd to be accessible from the pc.

@Keltere
Copy link

Keltere commented Mar 3, 2020

I can confirm what @MikeEitel suggested. Same exact behavior.

@thinkyhead
Copy link
Member

thinkyhead commented Mar 5, 2020

@MikeEitel — The !defined(HAS_SPI_LCD) is wrong and should just be !HAS_SPI_LCD.

@thinkyhead
Copy link
Member

@NickTom88 — I see that Conditionals_post.h contains this:

#if HAS_LCD_MENU && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) && !(defined(ARDUINO_GRAND_CENTRAL_M4) && SD_CONNECTION_IS(ONBOARD))
  #undef SD_DETECT_INVERTED
#endif

It looks like the SKR boards based on LPC176x might also apply.

@Keltere
Copy link

Keltere commented Mar 5, 2020

@thinkyhead thanks i can confirm that now, without LCD in SPI (not connected on exp1 and exp2), the sd it's working for eeprom but when unmounted it won't be hosted. Is that a normal behavior?

@thinkyhead
Copy link
Member

thinkyhead commented Mar 5, 2020

when unmounted it won't be hosted

If unplugging / replugging the USB cord to your PC doesn't bring it up then it's a mystery.
These boards are as all new to me as they are to the rest of you.

@jbmorgado
Copy link

jbmorgado commented Mar 27, 2020

The bugfix didn't work.

My temporary fix was to add the #define HAS_SDCARD_CONNECTION 1 statement:

#define HAS_SDCARD_CONNECTION 1
#if HAS_SDCARD_CONNECTION

@SknerusMcK
Copy link

@ellensp first solution helps, THANKS!

@github-actions
Copy link

github-actions bot commented Jul 2, 2020

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 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants