STM32F415 SDIO + STOP Mode
I am using an SD card with STM32F415. The MCU periodically enters STOP mode.
Currently, I observe the following behaviour in the IDE related to SDIO:
- Before enabling SDIO for the first time, the current consumption in STOP mode is as expected (around 180 µA), and the 48 MHz clock is greyed out in the Clock Configuration diagram in the IDE.
- As soon as I enable SDIO in SD 1-bit mode, the 48 MHz clock becomes active in the Clock Configuration diagram, and the current consumption in STOP mode jumps up by 1 mA. This is true even if I disable the call to MX_SDIO_SD_Init() in main().
- When I later disable the SDIO interface in the configurator, the 48 MHz clock remains active, and the current consumption in STOP mode remains with the additional 1 mA introduced when enabling the SD card for the first time.
I see no way of disabling the 48 MHz clock, either temporarily (before going to STOP mode) or permanently (by disabling the SDIO altogether in the IDE). I suppose this is also the reason why I can't eliminate that additional mA in STOP mode.
What is the correct way to turn off all the SDIO-related peripherals before switching to STOP mode to save as much power as possible?

