Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

XMC™ Forum Discussions

User10683
Level 1
Level 1
Hello,

I am having problems with a MicroSD Card on the XMC4500 Relax Kit.
I can not use the full SDMMC interface but instead I chose the SPI mode of the FATFS App.

The SPI signals are allocated to:

MISO P4.0 (SDMMC_DAT0)
MOSI P3.5 (SDMMC_CMD)
SCLK P3.6 (SDMMC_CLK)
SS P4.1 (SDMMC_DAT3)

I use the demo code of the FATFS App documentation.
This code passes

res = f_mount(&fs, "0:", 1);

without problems, but the next statement

res = f_mkdir("XMC4500");

returns with "FR_DISK_ERR"

The SDcard is OK, I tried various sizes, and various SPI Clock frequencies.

Any idea??
0 Likes
6 Replies
jferreira
Employee
Employee
First like received 750 replies posted 500 replies posted
Hi,

Which version of the APP are you using?
Have you tried enabling the delay?
4725.attach

Regards,
Jesus
0 Likes
User10683
Level 1
Level 1
Hi Jesus,

thanks for the reply.
The GUI you posted is for the SDMMC_BLOCK in SD mode. I am using SPI mode!
By the way, If I use SD mode, everything works fine on the same hardware with the same SD card.
But unfortunately I can not use the SD mode in my final hardware so I have to use SPI mode.

Regards
Matthias
0 Likes
User10683
Level 1
Level 1
... the versions:

FATFS: 4.0.26
SDMMC_BLOCK: 4.0.28
SPI_MASTER: 4.3.26
0 Likes
jferreira
Employee
Employee
First like received 750 replies posted 500 replies posted
Hi,

Sorry I did not realize about you mentioning SPI.
I just tried and worked for me. See attached.

Regards,
Jesus
0 Likes
User10683
Level 1
Level 1
Hello Jesus,

that works fine for me too, but the SPI_MASTER App you are using is version 4.3.28, a version that is not available to the public as it seams.
The latest version I can find is 4.3.26

Regards
Matthias
0 Likes
jferreira
Employee
Employee
First like received 750 replies posted 500 replies posted
Hi,

The v3.2.28 is a fix for the baudrate limitation introduced in v3.2.26. There are no changes in the code. See https://www.infineonforums.com/threads/10701-New-SPI-Master-bugged

Regards,
Jesus
0 Likes