Writes a byte stream to flash. The erase granularity of the flash (i.e. one page) will cause this operation to erase an entire page at a time. To avoid corrupting other flash contents, make sure that the memory range in flash being streamed to is starting on a page boundary, and that enough flash pages are available to hold all data being written.
nvmctrl_status_t NVMCTRL_Basic_write_flash_stream( flash_adr_t flash_adr, uint8_t data, bool finalize )
The function will perform flash page operations such as erase and write as appropriate, typically when the last byte in a page is written. If the last byte written is not at the last address of a page, the "finalize" parameter can be set to force a page write after this byte.
This function is intended used in devices where RAM resources are too limited to afford a buffer needed by the write and erase page functions, and where performance needs and code size concerns leaves the byte write and block write functions too expensive.
Type: flash_adr_t typedef
The byte-address of the flash to write to
Type: uint8_t
The data byte to write to the flash
Type: bool
Set to true for the final write to the buffer
Type: nvmctrl_status_t
Status of the operation