问答

汇集网友智慧,解决技术难题

sky_42959069

TA的家园币:31  

  • NUC131 PWM0 CH2 CH3双通道输出,为啥只有CH2输出呢?

    本帖最后由sky_42959069于2021-11-1711:12编辑SYS->GPA_MFP&=~(SYS_GPA_MFP_PA14_Msk|SYS_GPA_MFP_PA15_Msk);SYS->GPA_MFP|=(SYS_GPA_MFP_PA14_PWM0_CH2|SYS_GPA_MFP_PA15_PWM0_CH3);//PA14PA15用于PW0-CH2CH3//引脚设置voidPWM_Init(void){PWM_ConfigOutputChannel(PWM0,2,20000,0);PWM_ConfigOutputChannel(PWM0,3,20000,0);PWM_EnableOutput(PWM0,PWM_CH_2_MASK);PWM_EnableOutput(PWM0,PWM_CH_3_MASK);PWM_EnablePeriodInt(PWM0,2,0);PWM_EnablePeriodInt(PWM0,3,0);NVIC_EnableIRQ(PWM0_IRQn);}//初始化请大神们帮忙看下,初次玩新唐请多关照!

    PWM NUC131 双通道 gp BLE Output

    2021-11-17 2