I'm using a STM32 NUCLEO-L476RG board with an external SDCARD shield (that is wired using only CMD, CLK and D0 pins). I've tested this configuration using STM32CubeIDE and C programming (without using micropython) and it works. Next I've cloned micropython from git repo and I've compiled it as it's write in the ports/stm32/readme.md file, and all works fine (REPL, import modules, etc.). Now I'm trying to enable SDMMC periph that it's wired to the external SD shield but I don't understand how I can configure it, I've tried to add the lines:
Code: Select all
#define MICROPY_HW_ENABLE_SDCARD (1)
#define MICROPY_HW_SDCARD_SDMMC (1)
// SD card detect switch
#define MICROPY_HW_SDMMC_D0 (pin_C8)
#define MICROPY_HW_SDMMC_D1 (pin_C9)
#define MICROPY_HW_SDMMC_D2 (pin_C10)
#define MICROPY_HW_SDMMC_D3 (pin_C11)
#define MICROPY_HW_SDMMC_CK (pin_C12)
#define MICROPY_HW_SDMMC_CMD (pin_D2)
Code: Select all
MPY: sync filesystems
MPY: soft reboot
MPY: can't mount SD card
MicroPython v1.17-8-gbbbdef4cc-dirty on 2021-09-09; NUCLEO-L476RG with STM32L476RG
Type "help()" for more information.
>>>