Hi,

Do you have to change the frequency to zero?
I wouldn't.
Anything below the minimum allowed frequency can cause strange results with the HPWM command.
I think if you simply issue the command at the frequency you've been using, but at a 0% duty cycle, it will be solid OFF. If you issue the command with a 100% duty cycle (255 if 8-bit) it will be solid ON.

Does anybody see any problem with this approach?

Regards,