
This command can be used to bypass the file system and write directly to a sector on the SD card or USB stick. The disk does not need to be formatted. WS can also be used to implement custom file systems.
This command must be invoked with a single argument that is the sector number to write, followed by a CR/LF. After that, 512 bytes of arbitrary content must be sent. The command interface is blocked until those 512 bytes are completely received. Then, data is written to the specified sector and the command interface is available again.
ERR_OK (0) if data is successfully written to the card.
ERR_FR_NOT_READY (13) if write operation failed.
WS 1000 aaaaaaa....
512 bytes of 'a' in total, this fills sector 1000 with the character 'a'
Be carful when writing with this command to formatted disks. It can damage or completely destroy the filesystem.