I am trying to retrieve two 1-bit values (i.e. their previous values) after the system starts up OR write to it during the normal operation if cirumstances change. When I say "System starts up" I want to make it clear that this is a subsystem that sits inside a very big system.
THe idea is that if I disconnect this subsystem, the rest of the system is unaffected. I will preserve two 1-bit values based on their last known state. On a startup of the subsystem again, based on my processing, those 1-bit values will either be preserved or overwritten by new values. For confidential reasons, I cannot get into deeper than I already have.
My approach so far
Attached is the SIMULINK diagram of the part of the subsystem that does this memory read/write . I believe that this will work. However, I am not entirely sure. Could anyone think of a better way of doing it? I know that an obvious answer will be to say "Try to save and load from workspace" but I have a specficiation that only allows loading from Flash/E2PROM. Unfortunately, I don't know anything in SIMULINK that will do it. If anyone knows something different, I am quite happy to be educated fully :)
Thanks.
You basically need a memory. There are possibly multiple ways of doing this.
One more way is how the original question implements it using "Data Store".