Mount SD Card
LuckFox Pico Mini B and LuckFox Pico Plus/Pro/Max have built-in SPI NAND FLASH, allowing the system to be flashed onto it. Additionally, the SD card can be used as external storage. If the SD card is used as external storage, the GPIO3_A1~GPIO3_A7 pins cannot be used as GPIO pins. (Note: The SD card system supports FAT32 and exFAT formats by default; before mounting, the SD card needs to be formatted using the SD formatter.)
- Note:
- LuckFox Pico Mini B and LuckFox Pico Pro/Max come with the SD card already mounted in the default image, so it can be used by simply inserting it. LuckFox Pico Plus does not support mounting the SD card by default; you need to enable it in
luckfox-config
. - If the SD card is used as the system's storage medium, then the SDMMC option cannot be configured. After disabling the SDMMC pins, ensure that no TF card is inserted if you intend to connect other peripherals to the exposed pins. (Only LuckFox Pico Plus has exposed SDMMC pins.)
- LuckFox Pico Mini B and LuckFox Pico Pro/Max come with the SD card already mounted in the default image, so it can be used by simply inserting it. LuckFox Pico Plus does not support mounting the SD card by default; you need to enable it in
Mounting
使用 luckfox-config 打开相关配置:
- Use the ↑ and ↓ keys on the keyboard to select menu items, the Enter key to enter, and the ← and → keys or Tab to select the OK and Cancel buttons. The Esc key cancels and returns, while the spacebar selects an option. Any changes will take effect after rebooting. Note: When logging in via ADB, the Arrow keys and Tab cannot be used; you can only use numbers to select options, and press Enter to confirm.
Make sure the latest image is flashed to the board, then execute the following on the terminal:
luckfox-config
Select
Advanced Options
:Select
SDMMC
:Enter the Compatible Devices -> SDMMC interface, select
enable
to enable, anddisable
to disable:Note: The SDMMC disable configuration can take effect without rebooting, but the enable configuration requires a reboot to take effect.
Use the
df
command to check.
Device Tree
Disabling SDMMC when the system boots from the SD
card may prevent the system from starting. When the system boots from SPI NAND FLASH
, SDMMC can be disabled to use the pins for other functions. The SDMMC configuration is already included by default in <Luckfox-pico SDK>/config/dts_config
:
&sdmmc {
max-frequency = <50000000>;
no-sdio;
no-mmc;
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_bus4>;
status = "okay";
};
- To disable SDMMC, simply change the status attribute to
disabled
.