开发板CMOS接口用的是BPWM作为CMOS的输入时钟信号,BPWM输出100KHz时是方波,但是输出10MHz时波形有点像三角波,波形如图片所示。请问这是什么原因造成的?谢谢
用的是BSP\SampleCode\StdDriver\BPWM_SwitchDuty的代码
/* Enable BPWM0 clock source */
CLK_EnableModuleClock(BPWM0_MODULE);
/* Select BPWM module clock source */
CLK_SetModuleClock(BPWM0_MODULE, CLK_CLKSEL2_BPWM0SEL_PLL, 0);
SYS_ResetModule(BPWM0_MODULE);
/* Set PG.10 multi-function pin for BPWM0 channel 4 */
SYS->GPG_MFPH &= ~SYS_GPG_MFPH_PG10MFP_Msk;
SYS->GPG_MFPH |= SYS_GPG_MFPH_PG10MFP_BPWM0_CH4;
/* BPWM0 channel 4 frequency is 10000000Hz, duty 50%, */
BPWM_ConfigOutputChannel(BPWM0, 4, 10000000, 50);
/* Enable output of BPWM0 channel 4 */
BPWM_EnableOutput(BPWM0, BPWM_CH_4_MASK);
/* Start BPWM counter */
BPWM_Start(BPWM0, BPWM_CH_4_MASK);
|
|