I believe you actually don't need to disable the tou entries to go into vpp mode, but I understand it can be good to mark them as inactive to avoid misunderstandings. But...
-
Tou entry 1 is always written. No need if it is already disabled.
-
When writing the tou entries, just disable them, don't destroy them. Write back the same times and mode as before, just vhange the active flag.
I believe you actually don't need to disable the tou entries to go into vpp mode, but I understand it can be good to mark them as inactive to avoid misunderstandings. But...
Tou entry 1 is always written. No need if it is already disabled.
When writing the tou entries, just disable them, don't destroy them. Write back the same times and mode as before, just vhange the active flag.