cancel
Showing results for 
Search instead for 
Did you mean: 

SD card formatting using fileX

frogrammer
Associate II

Hi, It works, apparently a different microSd card works.

however, it is strange that, DATALOG2 could write into the card.

May i know how shall i perform sd card format function or what to fill up in the function?

 

Follow-up of the the topic below:

Solved: Re: Standalone FileX SDIO SD Card Initializing err... - STMicroelectronics Community

 

4 REPLIES 4
Saket_Om
ST Employee

Hello @frogrammer 

To format your SD card you can use f_mkfs(). Please refer to the article below:

How to create a file system on a SD card using STM... - STMicroelectronics Community 

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.
Saket_Om

thats using fatfs, not FileX

 

@frogrammer 

For FileX it is fx_media_format(). Pledase refer to the implementation on the example below:

STM32CubeWBA/Projects/NUCLEO-WBA65RI/Applications/FileX/Fx_File_Edit_Standalone/FileX/App/app_filex.c at main · STMicroelectronics/STM32CubeWBA · GitHub

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.
Saket_Om
AScha.3
Super User

Usually every new SD card is formatted,

at the optimum for this card.

So you just could do it worse by format the card.

And always first do only read tests, with existing file on card, then read and write tests. Format should be never needed, bzw bigger cards are exfat formatted and need this enabled in fat drivers.

If you feel a post has answered your question, please click "Accept as Solution".