Filestream Flush Operation

Does the internal flash method Flush return False when the internal flash is being erased/written and True when complete (as you would expect from the micro’s status register)?

If not, is there an alternative to Sleep?

Hi @NBT
The Flush method returns (internally) errors such as Hardware errors, or No error occured during the erasing and writing to the flash, but doesn’t return false or true depending on its status.

Could you tell me what do you want to implement? :smile:

For this application I’m just writing a small amount of configuration data to Flash. In general, I’m looking for a way to read the status of a Flash write. On a micro, operating in near real time, Sleep is not a viable option.

Unfortunately, The flash status feature is hardware-specific so If you want that feature on any additional feature you can contact the Zerynth sales team to arrange this.

In general, Sleep in Zerynth is priority preemptive so you can implement multiple threads and use sleep accordingly.
However, Can’t you just declare a boolean that gets set before and after the flush method, and check for that boolean if the flush is still running?

OK, thanks for the ideas.