The results were the same across different firmwares (build 20150213 and 20130318) and module types (ESP-03 and ESP-12). Changing the pin used had no effect, nor did changing the step size -- no matter what step size used, I could only change it about six times before the module rebooted.
I think this code will demonstrate the problem. I am replicating it from memory since I'm at work and don't have my ESP modules with me.
local pin=8
pwm.setup(pin, 1000, 0)
pwm.start(pin)
for i=0,1000,100 do
pwm.setduty(pin,i)
tmr.delay(500000)
end
I tried doing a pwm.stop() and pwm.start() before and after the setduty calls, made no difference. I tried doing a full pwm.setup() call instead of pwm.setduty(), made no difference.