How to write on SD card smaller than sector size (512 bytes)
Read, modify and Write the sector in the file allocation table to update cluster indexes.


You must do that only when the number of clusters for a file changes. A usual cluster size is 32 KB.


  Read, modify and Write the sector in the file new allocated cluster.


No, you only have to write the changed data sectors.  You could omit the read cycle when you write the data to card in 512 byte steps.


  Read, modify and Write the sector where the file entry reside.


Most FAT implementations write this once on file create, and once on file close (to update the size when written to).