The invention discloses an automatic test method for a digital
chip PWM module, and the method comprises the steps: enabling a plurality of PWM capture channels to be connected with a plurality of PWM output channels, and enabling the fault input channels of the PWM output channels to be connected with a
general purpose input / output (GPIO); creating an output
signal data frame, wherein the data frame records a channel number, a channel state, a period value, a pulse width value, an output channel frequency division value, an effective level and a fault level; a PWM channel is started for capturing, and the pulse width and the period of an output channel are captured; the method comprises the steps of setting a period value, a pulse width value and an output frequency division value of a PWM output channel, outputting a PWM
signal with a set duty ratio, initializing a data frame, and recording a channel number, the period value, the pulse width value, the frequency division value, an effective level and a fault level of the current PWM output channel; when the PWM capture channel detects that the state of the PWM output channel is RUN, whether the capture pulse width and period are consistent with the output pulse width and period of the output channel is compared, and when the capture pulse width and period are consistent with the output pulse width and period of the output channel and the number of normal capture times reaches a set threshold value, the PWM output period and duty ratio test is completed.