Because of how Microsoft's FAT file system works, host systems need to extend files frequently when adding more data, and this means that when a cluster boundary is reached, a new cluster needs to be found and added to the file cluster chain.
Complicated? Not really, but it does cause timing problems when using a microcontroller to stream data to an SD/MMC card.
How do we get around the cluster allocation timing problems?
We preallocate the file - that is, we extend the file at the before we begin writing data to it.
Here is how we do it.
(Note: The command examples are for the uMMC - just add “FC” to the beginning of the command for the rMP3 and uMP3)