我将变成怎样

    1. 28335为啥不能4路PWM同时输出 7/3057 微控制器 MCU 2019-07-30
      chenbingjy 发表于 2019-7-30 15:51  InitEPwm2Gpio(); 感觉很奇怪。会不会是你 InitEPwm2Gpio();把 InitEPwm1Gpio();里的给 ...
      void  InitEPwm1Gpio(void) {     EALLOW;     //     // Enable internal pull-up for the selected pins     // Pull-ups can be enabled or disabled by the user.      // This will enable the pullups for the specified pins.     // Comment out other unwanted lines.     //     GpioCtrlRegs.GPAPUD.bit.GPIO0 = 0;    // Enable pull-up on GPIO0 (EPWM1A)     GpioCtrlRegs.GPAPUD.bit.GPIO1 = 0;    // Enable pull-up on GPIO1 (EPWM1B)        //     // Configure ePWM-1 pins using GPIO regs     // This specifies which of the possible GPIO pins will be ePWM1 functional      // pins. Comment out other unwanted lines.     //     GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1;   // Configure GPIO0 as EPWM1A     GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1;   // Configure GPIO1 as EPWM1B     EDIS; }   void  InitEPwm2Gpio(void) {     EALLOW;     //     // Enable internal pull-up for the selected pins     // Pull-ups can be enabled or disabled by the user.      // This will enable the pullups for the specified pins.     // Comment out other unwanted lines.     //     GpioCtrlRegs.GPAPUD.bit.GPIO2 = 0;    // Enable pull-up on GPIO2 (EPWM2A)     GpioCtrlRegs.GPAPUD.bit.GPIO3 = 0;    // Enable pull-up on GPIO3 (EPWM3B)     //     // Configure ePWM-2 pins using GPIO regs     // This specifies which of the possible GPIO pins will be ePWM2 functional      // pins. Comment out other unwanted lines.     //     GpioCtrlRegs.GPAMUX1.bit.GPIO2 = 1;   // Configure GPIO2 as EPWM2A     GpioCtrlRegs.GPAMUX1.bit.GPIO3 = 1;   // Configure GPIO3 as EPWM2B     EDIS; } //文件里配置的,没改过。
    2. 28335为啥不能4路PWM同时输出 7/3057 微控制器 MCU 2019-07-30
      chenbingjy 发表于 2019-7-30 15:36 我将变成怎样 发表于 2019-7-30 15:22 每个pwm波的配置都一样的,只是改变了频率和周期值。单个PWM编译都 ...
      4个管脚,只有两个有互补波形。PWM1与PWM2分开编译,对应的两个GPIO口都有波形。程序合在一起编译(如上图的程序),PWM2对应的两个GPIO口有波形,PWM1的没有。
    3. 28335为啥不能4路PWM同时输出 7/3057 微控制器 MCU 2019-07-30
      chenbingjy 发表于 2019-7-30 15:12 好好检查程序,一定可以做到的
      每个pwm波的配置都一样的,只是改变了频率和周期值。单个PWM编译都能成功。。

最近访客

< 1/1 >

统计信息

已有3人来访过

  • 芯积分:--
  • 好友:--
  • 主题:1
  • 回复:3

留言

你需要登录后才可以留言 登录 | 注册


现在还没有留言