STM32 freeRTOS data corruption when writing to sd card

Hello @Buckridge, yes, same experience here. It is worth to pay more for your memory cards in order to get a better quality.

A second problem is that the memory cards slide into a socket. Hundreds of times I have taken out a card, cleaned its contacts and remounted it. Only then it would work again.

Some companies decide to use fixed memory cards, they can only be replaced with a soldering iron, which I think is a good solution.
If not, you are facing problems with oxidation ( rust ) and all kinds of small insects like spiders.

Does this answer your question or did you have something else in mind?