[pwm] add optional frequency parameter
[tm4c123g pwm] support both timer and PWM modes