eriksl wrote:The key is choosing the "right" values for period and duty, they're different than you're used to, they both count in 200 nsec (5 MHz source clock) slices now. So suppose you want a 16 bit / 76 Hz timer, you specify 65536 as the "period" and then the duty can be 0 - 65535. Similarly, for a 15 bit / 162 Hz timer, you specifiy 32768 as the period and the duty can ben 0 - 32767. And #undef compatibility mode.
For 100% duty, you should specify the same value as for period, not 1 less - period is the maximum value, not the number of steps.