M21: Initialize SD card
Compatibility Command: This command performs NO operation in Smoothieware and is kept for compatibility only.
This command exists in Smoothieware purely for compatibility with other firmware (like Marlin/RepRap firmware).
When received, Smoothieware acknowledges the command but does nothing.
Smoothieware automatically initializes the SD card on boot, so manual initialization is not required.
V1 Behavior:
M21 is recognized but performs no operation. Your Smoothieboard automatically initializes the SD card at boot, making this command unnecessary for normal operation. It’s provided only to allow G-code files written for other firmware (Marlin, RepRap) to work without modification.
V2 Behavior:
M21 is recognized but performs no operation. V2 uses modern SDIO drivers for improved SD card performance and reliability, but like V1, automatic initialization occurs at boot. This command is maintained for backward compatibility with G-code files and control software written for other firmware platforms.
The command is used as such:
M21
Which means: the command will be received but Smoothieware will perform no operation.
Parameters
The M21 command requires no parameters.
Example
If you command:
M21
Smoothieware will acknowledge the command but perform no operation.
The SD card will remain in its current state.
Configuration
The M21 command requires no special configuration settings.
Since Smoothieware handles SD card initialization automatically, this command is not necessary for normal operation.
Further reading
These resources are used as references: