I'm using a STM32 NUCELO-L476RG board with an external SDCARD shield that use the SDMMC peripherl (only CMD, CLK and D0 pins). I've tested the shield with STM32CubeIDE and C programming and it works. Now 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.). I'm trying to enable SDMMC peripheral that it's wired to the shield, but I don't understand how I can configure it, I've tried to add the line
Code: Select all
#define MICROPY_HW_ENABLE_SDCARD (1)
#define MICROPY_HW_SDCARD_SDMMC (1)
#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.
>>>