void PWM_Requence_Update(unsigned int REQU) { // unsigned int duty_temp; duty_temp = REQU >> 1; gADDR_DOConfig_HY.pwmMode = DL_TIMER_PWM_MODE_EDGE_ALIGN_UP; gADDR_DOConfig_HY.period = REQU; gADDR_DOConfig_HY.startTimer = DL_TIMER_STOP; DL_TimerG_initPWMMode( ADDR_DO_INST, (DL_TimerG_PWMConfig *) &gADDR_DOConfig_HY); DL_TimerG_setCaptureCompareValue(ADDR_DO_INST, duty_temp, DL_TIMER_CC_0_INDEX); DL_TimerG_enableClock(ADDR_DO_INST); }
I need to constantly modify the PWM frequency during the running of the program, but when I reconfigured the PWM frequency, there was no output at the IO port.Attached is my code for reconfiguring the PWM frequency.After executing this part of the code, the IO port has no output.Please help me solve this problem,Thanks!