How to update the duty ratio register and cycle register in PWM mode?
In 8/12/16-bit PWM mode, every Timer has corresponding cycle register and duty ratio register with following operations. 1. In 8-bit PWM mode, data should be written first into P_TMRx_PWMDuty, and then P_TMRx_PWMPeriod.(x=0,2,4) 2. In 12-bit PWM mode, when updating cycle, data should be written first into P_TMRx_DutyPeriod, and then P_TMRx_PWMPeriod; when updating duty ratio, data should be written first into P_TMRx_DutyPeriod, and then P_TMRx_PWMDuty.(x=1,3) In 16-bit PWM mode, when updating cycle, data should be written first into P_TMR5_DutyPeriodHi, and then P_TMR5_PWMPeriodLo; when updating duty ratio, data should be written first into P_TMR5_DutyPeriodHi, and then P_TMR5_PWMDutyLo.