Hello,
If further data needs to be added to the buffer, before all the previous data has been sent, the buffer would need to be of the "circular" type (or FIFO), with a "head" pointer and a "tail" pointer to keep track of the position of data entering and leaving the buffer.
I am not sure if this is part of your requirement.
A further thought - since your data is already present in flash, I would guess that you don't really need the RAM buffer at all. You would only need to set up a pointer to the data table in flash, read one byte at a time to be sent to the peripheral, and then increment the pointer. The first byte of each data table could contain the number of bytes to be sent, or alternatively the presence of a special byte value could indicate when the end of data is reached.
I have used this approach when sending "canned" message data to a SPI. Each message was terminated by a null. I also provided an additional table containing the start address for each message, so that an individual message could then be referenced by an index number.
Regards,
Mac