I haven't experienced any issues like this with the latest firmware. Can you post a simple code sample and I will try to reproduce it?
Steve
I actually wrote a new code fragment to test it out and it seems to be working now. I am using this piece:
public class Program { public static void Main() { PWM pwm = new PWM(PWMChannels.PWM_PIN_D5, 1000, 500, PWM.ScaleFactor.Microseconds, false); OutputPort led = new OutputPort(Pins.ONBOARD_LED, false); Boolean ledState = false; while (true) { led.Write(ledState); ledState ^= true; Thread.Sleep(500); } } }
In retrospect I think I made two mistakes:
1. I used the wrong pin. Wanted to use D5 but started with Cpu.PWMChannel.PWM_5 which Intellisense suggests so very helpfully. I still find it confusing that instead I have to use the wrappers (PWMChannels.PWM_PIN_D5, also for the normal pins)
2. I set the ScaleFactor to Milliseconds and used the values above for period and duration.
So, sorry for the smoke, it seems to work now!
Thank you so much,
Jens