cancel
Showing results for 
Search instead for 
Did you mean: 

STM32303E-Eval SD Card

DNA-)
Associate III

Hi everyone,

As part of one of my projects, I have to use an SD card to store my data. Since the final board has not yet been manufactured, I started developing my software on the STM32303E-EVAL evaluation kit.
For reference, it uses the same microcontroller that will be on my own board.

Back to the STM32303E-EVAL. When I received this board, the provided demo worked correctly (GUI display and so on).
I wanted to test the examples dealing only with the SD card (FAT32 format), which are available in the repository:
 STM32Cube_FW_F3_V1.11.0\Projects\STM32303E_EVAL\Applications\FatFs\FatFs_uSD

Imported into CubeIDE, it does not compile, files are missing – in short, it is a mess.

So I started over from scratch, installed AC6, opened the project, flashed it, started a debug session, and I get stuck in f_mount().
The SD card is correctly inserted.

Could you help me?
Or, failing that, provide me with a working example?

Stack.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
DNA-)
Associate III

The main problem was the size of the SD Card. 

The board came with a 32G Card which is not compatible with example.

Working with a 2Gb SD Card.

View solution in original post

4 REPLIES 4
mƎALLEm
ST Employee

Hello,


@DNA-) wrote:

 STM32Cube_FW_F3_V1.11.0\Projects\STM32303E_EVAL\Applications\FatFs\FatFs_uSD

Imported into CubeIDE, it does not compile, files are missing – in short, it is a mess. 


Did you try to refer to the user manual UM2579 "Migration guide from System Workbench to STM32CubeIDE"

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Hello,

Yes, I did it. I can’t manage to compile, but that’s not a big deal, I switched to AC6 instead.
The core of the problem, and what I don’t understand, is why the example doesn’t work in the project opened with AC6.
I really need this part to work so that I can move forward with the development of my firmware.

DNA-)
Associate III

To be more precise, the code loops on:

 

/*----------Activates the card initialization process-----------*/
/* Send CMD1 (Activates the card process) until response equal to 0x0 and
Wait for no error Response (R1 Format) equal to 0x00 */
while (SD_SendCmd(SD_CMD_SEND_OP_COND, 0, 0xFF, SD_RESPONSE_NO_ERROR) != MSD_OK);

in stm32303e_eval_sd.c 

DNA-)
Associate III

The main problem was the size of the SD Card. 

The board came with a 32G Card which is not compatible with example.

Working with a 2Gb SD Card.