How fast can one reliably write data to an SDcard?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How fast can one reliably write data to an SDcard?

661 Views
dalim
Contributor I

Hi,

I am using Freedom K64F with MK64FN1M0VLL12, Kinetis Design Studio 3.2.0, MQX 4.2, and mfs_sdcard driver. I want to read data from an accelerometer via SPI and subsequently store them in an SDcard. Here are my questions:

1) How fast can I write to an SDcard, say three columns of data every loop, which each element having at least four decimal places.

2) What is the fastest that one can open, create, and stop the writing operation without corrupting the data stored? For instance, I'd like to start a new file to store data every specified interval.

Thanks.

0 Kudos
3 Replies

592 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello,

It depends on the configurations that are considered in the design. For example if you would like to do the operations in SPI mode rather than SD mode, then it uses only 1 bit wide data bus width. Which consequently is slower than if you use the other supported modes which include 4-bit or 8-bit wide data buses. The K64 supports data transfers of up to 200Mbps using 4 parallel lines and 416Mbps if using 8 parallel lines. In addition it should also be considered the type of card that is being used to confirm the standard it supports. 

The data size should be taken into account as to how many bytes will be transferred. This will clarify how fast it will be able to write to the SD card.

The max speed supported is as mentioned above depending on the different characteristics of the application as well as the standards supported by the card.There is an example included in our SDK for sdcards. I would recommend to check the process for writing that is implemented including the actual data transfer as well as the flags that indicate when it is done writing. 

If you have further questions please let me know.

Best Regards,

Sabina

0 Kudos

592 Views
dalim
Contributor I

Hi Sabina,

Thanks for the explanation. Could you link me to the example?

Thanks.

0 Kudos

592 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello,

Of course! You can download the SDK from our MCUXpresso website.

Once downloaded you can import the sdk examples. For SDCard you will find

pastedImage_1.png

There are also fatfs examples that might be of help as well.

Best Regards,

Sabina

0 Kudos