
The FSYNC command can be used to specify a time-out condition in order to flush file caches and update the FAT structure. if FSYNC is used, and a file is open for writing, all cached data will be written to disk, and corresponding FAT entries are written periodically. This feature helps to minimize data loss under rough conditions, where power failures can occur.
FSYNC requires one argument that is the "flush time" in milliseconds. If 0 is given, the flush feature is switched off. The argument of FSYNC is stored in internal NVRAM and is effective after next reboot.
FSYNC globally applies to all files that are open for writing. There's no per-file FSYNC feature.
To retrieve the stored FSYNC argument, simply invoke FSYNC?
ERR_OK (0) Always. Invalid inputs (such as letters) are interpreted as zero.
FSYNC 1000
All files are flushed within a period of one second
FSYNC?
Shows current FSYNC value: 1000
Only devices with mass storage such as SD-Cards or USB sticks support this command.