Anyway, I figured out that I have to configure the pins for the SPI bus like this:
Code: Select all
palSetPadMode(IOPORT1, 5, PAL_MODE_STM32_ALTERNATE_PUSHPULL); /* SCK. */
palSetPadMode(IOPORT1, 6, PAL_MODE_STM32_ALTERNATE_PUSHPULL); /* MISO. */
palSetPadMode(IOPORT1, 7, PAL_MODE_STM32_ALTERNATE_PUSHPULL); /* MOSI. */
Otherwise the system always crashed when calling mmcConnect().
My question now is, if I have missed anything because I could not find this in any of the SPI SD examples and neither do I get where the pin configuration comes from (not even for 2.6) if not from the user. I looked into the MMC/SPI driver files but just found nothing.