Host Engineering Forum
General Category => CTRIO and CTRIO2 => Topic started by: ERokc on March 24, 2015, 02:12:28 PM
-
I need to reload a preset table before the existing one finishes. I also need to CTREGWR a new value to the accumulator. I know how to do each I just need to know the order to do it.
Do I need to clear the existing one first then load the new one?
Can I just load over the existing one?
What's a reliable procedure?
Dave
-
Loading a table overwrites the previously loaded table. No need to clear.
A new table doesn't get fully happy until the associated counter has been through a reset. Reset updates the accumulator.
So...load the table, reset the counter, write the accumulator.
-
I discovered "counter reset to a value". Can I load the table, toggle $CTRIO_000_C2F1.Reset to get the accumulator set? If so that would be cleaner.
Is there a preset table reset? All I need is to start over periodically.
-
I discovered "counter reset to a value". Can I load the table, toggle $CTRIO_000_C2F1.Reset to get the accumulator set? If so that would be cleaner.
Is there a preset table reset? All I need is to start over periodically.
Yes, that will work.
There is no reset for the table, only the counter.