FATFS config: _FS_ENABLE_THROUGHPUT_OPTIMIZATION

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

FATFS config: _FS_ENABLE_THROUGHPUT_OPTIMIZATION

1,369 Views
giacomopetrini
Contributor IV

Hello,

using KSDK 1.1, KDS 2.0.0 with a FRDM-K64F.

Project Bare metal (no rtos).

 

I've implemented a data logger, and it works.

Now I'm trying to improve the performances and in ffconf.h there is this #define _FS_ENABLE_THROUGHPUT_OPTIMIZATION.

 

If I set it to 1 the fatfs will use 2 sector as buffer to write to the SDHC.

If I set it to 2 I can decide how big will be the buffer (2-8 sectors).

 

So the question is:

somebody has already done some test/benchmark/... with this _FS_ENABLE_THROUGHPUT_OPTIMIZATION?

Pro/cons on setting it to 0, 1 or 2?

 

Thank you

Regards Giacomo

Labels (1)
0 Kudos
Reply
3 Replies

940 Views
DavidS
NXP Employee
NXP Employee

Hi Giacomo,

Please look at following link.

Trying the throughput test with the host_msd_fatfs_frdmk22f_mqx_frdmk22f

Regards,

David

0 Kudos
Reply

940 Views
giacomopetrini
Contributor IV

thanks.
but not really what I was asking (but it answered a question in another thread).


_FS_ENABLE_THROUGHPUT_OPTIMIZATION

is a #define inside fatfs code, it has nothing to do with USB. It is used to improve SDHC writes.

Regards Giacomo

0 Kudos
Reply

940 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Giacomo,

The code starts on line 641 with #if _FS_ENABLE_THROUGHPUT_OPTIMIZATION in ff.c code. You perhaps know.

Also comes into consideration how is SD card formated (allocation unit size) and how large files you will write and read.

if you write on the SD card small files (kB) is better to use small buffer and small allocation unit. For bigger files is better use bigger buffer and bigger allocation unit.

Best  Regards,

Iva

0 Kudos
Reply