Spent some time poking at the PWM support, and can confirm the math... doesn't work at arbitrary frequencies (the frequency is written out as the period value multiplied out, and not the inverse as it should be). This also maps to the duty cycle being very wrong at frequencies not == 100.