Set ports to SMPC control mode in critical section