16-04-2023, 08:28 PM
The above code is just making sure that if the data passed to my script in the buffer is not an even multiple of a Flash programming block size, that the rest of the RAM being to send to the Flash is filled with empty bytes rather than whatever happened to be in RAM (usually the remains of the last data block sent).
In other words, if I'm asked to program 32 bytes to flash, I cannot do that. I can only write 64 bytes at a minimum. So I send 32 bytes of data and 32 bytes of 0.
In other words, if I'm asked to program 32 bytes to flash, I cannot do that. I can only write 64 bytes at a minimum. So I send 32 bytes of data and 32 bytes of 0.