start_pwm:
- Enable the auto re-load function
- Set the TCNTBn to and the TCMPBn
- Set the manual update bit and configure the inverter bit (on/off). (The manual update bit sets TCNTn and TCMPn to the values of TCNTBn and TCMPBn)
- set the TCNTBn and the TCMPBn, to determine the next reload value
- Set the start bit, provided that manual_update is 0 and the inverter is off and auto reload is on. The timer starts counting down after latency time within the timer resolution.
- Start end。
- TCNTBn and the TCMPBn are set for the next duration。
- auto reload and interrupt request are disabled to stop the timer。
