add pwm test in mem function