FATFS config: _FS_ENABLE_THROUGHPUT_OPTIMIZATION

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FATFS config: _FS_ENABLE_THROUGHPUT_OPTIMIZATION

1,025件の閲覧回数
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

ラベル(1)
0 件の賞賛
3 返答(返信)

596件の閲覧回数
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 件の賞賛

596件の閲覧回数
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 件の賞賛

596件の閲覧回数
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 件の賞賛