STM32F407VET6 SD Card Reader

Hi everyone,
I have the STM32F407VET6 board and it has an SD Card Reader. I'm wondering how to use it with the arduino IDE.
Here you can see how the reader is wired to the board, and here is a tutorial on how to use it with the Arduino IDE, but I didn't understand it well, and apparently he did do some strange wirings to use it with the SPI port instead of the SDIO port that it's normally wired to.
I need to find a way to use it like it is with the Arduino IDE, and I need to know which type of SD Cards to use and what's the max capacity that the SD Card has.

Full disclosure: I don't have this board so what follows may be wrong.

What don't you understand about the setup?

The second link you provided does give some details but you may not be familiar with the terminology. Looking at the wiring details from your first link, the board has the SD card holder wired to what they call the SDIO bus. That looks to be the faster version of the simpler SPI bus - faster in that it can transfer 4 bits at once rather than 1 bit (I think that's right).

The author is simply connecting the SD card holder up in ordinary 3-wire SPI mode using jumpers to connect the required pins from the SDIO but onto the pins of the SPI bus. The author is effectively shorting some pins together as the SD card holder is still connected to the SDIO bus.

I would suggest you try the cardinfo example sketch. Follow the authors instructions to add the #defines to the top of the cardinfo sketck. The in the cardinfo setup() function add in the 3 pinMode function calls as well as the 3 SPI.set function calls.

I believe that you will be limited to 32Gb. However I think there is an exFAT library out there that can access higher capacity cards but i've not needed such a vast amount of storage so have no knowledge of it.

Yeah I thought about that SPI function to set the pins, but I guess you need to use hardware SPI pins not any pins I want. Moreover I'm using the main SPI bus on that board for another component, I thought about using another one, but even if I set the pins, I think that when I put the SD.begin(); It will automatically use the main SPI which is the SPI1, so I need to find a way to change that.

That would depend on the pin multiplexing capabilities of the micro. The 328P micro uses fixed pins for 1 SPI port. The SAMD micros let you choose from 3 or 4 possible sets of pins for a hardware SPI port.

That example code you linked to may be using a hardware SPI port. You would need to check the datasheet for the actual chip to discover this.

SPI is a bus and you can connect more than 1 device to it. Just use another i/o pin as the Chip Select for your extra device.

It's the RF24 so I think that I can't

If it's a compliant SPI device, then I don't see why not. It will have a Chip Select (or Slave Select) signal just like any other SPI device.

Well, i had the idea of searching SDIO in the arduino library manager, and I did find a library for SD card readers connected to the SDIO bus, but I didn't try it yet. Here's the link for anyone interested