-
-
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] Media Init Fail #26910
Comments
I can see in file Marlin/scr/HAL/AVR/HAL_SPI.cpp the following - void spiBegin() { |
Well, I can´t make it work. Don´t know why tthe issue closed |
I have found in file scr/sd/Sd2Card.cpp what looks like the code to initialize de SD card. There's a note which says /**
|
I have tried inserting in the same file |
It was hardware. The RAMPS 1.4 - For whatever reason PIN53 was faulty. I am very sorry to anyone who bothered to look into the issue |
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
SD card doesn´t work- Screen messages say "Media Init Fail" in the status screen, and "No media" in the menu
Bug Timeline
It looks like it's always been there.
Expected behavior
I expected the SD card to work
Actual behavior
SD card cannot be initialized.
Steps to Reproduce
1- switch on
2- Insert card
3 - Card cannot be read
Version of Marlin Firmware
2.1.2.2., but I have tried with other versions with the same result
Printer model
Custom CNC
Electronics
Mega2560, RAMPS 1.4, RepRap Discount Full graphic Smart Controller
LCD/Controller
RepRap Discount Full graphic Smart Controller
Other add-ons
No other hardware involved
Bed Leveling
None
Your Slicer
None
Host Software
None
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
Marlin.zip
Marlinbugfix.zip
In order to check if the card was poorly formatted, or if there was any hardware issue, I have compiled and run the SD library example "Cardinfo", setting it to pin 49 of the RAMPS, and this is the output:
Initializing SD card...Wiring is correct and a card is present.
Card type: SDHC
Clusters: 3898368
Blocks x Cluster: 8
Total Blocks: 31186944
Volume type is: FAT32
Volume size (Kb): 15593472
Volume size (Mb): 15228
Volume size (Gb): 14.87
Files found on the card (name, date and size in bytes):
SYSTEM
1/ 2024-03-25 23:06:521.DAT 2024-03-25 23:06:52 12WPSETT
INDEXE~1 2024-03-25 23:06:54 76
Therefore, I'd say the SD card is working OK and card reader (embedded with the RepRap Graphic Controller) is also working OK
So I suppose there's either an issue with the FW or I am just terrible with my config, but I have been unable so far to find that big mistake.
I have posted here both the 2.1.2.2. config, (with SDSUPPORT) and version bugfix 2.1.x (with HAS_MEDIA). They behave exactly the same way.
Here is a summary of the SD commands as you'll find them in the Configuration.h and the Configuration_adv.h
#define SDSUPPORT
#if ENABLED(SDSUPPORT)
//#define SD_SPI_SPEED SPI_HALF_SPEED - I have tried full, half, a quarter and an eighth - same result
#define SD_PROCEDURE_DEPTH 1 // Increase if you need more nested M32 calls
#define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
#define SD_FINISHED_RELEASECOMMAND "M84" // Use "M84XYE" to keep Z enabled so your bed stays in place
#define SDCARD_RATHERRECENTFIRST
#define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing
#define EVENT_GCODE_SD_ABORT "G28XY" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27")
#if ENABLED(PRINTER_EVENT_LEDS)
#define PE_LEDS_COMPLETED_TIME (30*60) // (seconds) Time to keep the LED "done" color before restoring normal illumination
#endif
#define SDCARD_CONNECTION LCD
#endif // SDSUPPORT
I think the only other modification I have made in the marlin code is a custom config menu to activate (or not) a laser cross with M42 P11 S255 (or S0), and also a custom bootscreen and a custom status screen image but these two lines have been commented in the files I have attached here.
The text was updated successfully, but these errors were encountered: