Replies: 1 comment
-
at this time, i have to reuse the SPI pin symbols to get sdmmc one line to work: machine_sdcard.c | machine_sdcard_make_new() if (is_spi) {
// SPI interface
DEBUG_printf(" Setting up SPI slot configuration");
...
} else {
// SD/MMC interface
DEBUG_printf(" Setting up SDMMC slot configuration");
// sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
#if defined(MICROPY_HW_SDMMC_SLOT_CONFIG)
DEBUG_printf(" my sdmmc configuration");
sdmmc_slot_config_t slot_config = MICROPY_HW_SDMMC_SLOT_CONFIG();
if ( (arg_vals[ARG_miso].u_obj != mp_const_none) &&
(arg_vals[ARG_miso].u_obj != mp_const_none) &&
(arg_vals[ARG_miso].u_obj != mp_const_none)
) {
DEBUG_printf(" use user pin: sck->clk, miso ->cmd, mosi ->d0");
SET_CONFIG_PIN(slot_config, clk, ARG_sck);
SET_CONFIG_PIN(slot_config, cmd, ARG_miso);
SET_CONFIG_PIN(slot_config, d0, ARG_mosi);
}
#else
DEBUG_printf(" default sdmmc configuration");
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
#endif // MICROPY_HW_SDMMC_SLOT_CONFIG
}
... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
the machine.SDCard() method, is designed for SPI and has no sdmmc pin configuration, we have to change code to use board specific signal: cmd, clk, d0....
can we enhance this method or add a new method to support SDMMC interface? so we can just specify the clk, cmd, d0...d7, cd, wp, width, in the user .py script without change mpy code and recompile whole thing.
discussion about using esp32-s3 sdmmc interface:
Beta Was this translation helpful? Give feedback.
All reactions