如何关断DSP里的PWM脉冲,dsp的型号是f28335
答案:1 悬赏:0 手机版
解决时间 2021-04-01 17:41
- 提问者网友:沉默的哀伤
- 2021-04-01 10:03
如何关断DSP里的PWM脉冲,dsp的型号是f28335
最佳答案
- 五星知识达人网友:摆渡翁
- 2021-04-01 11:15
EALLOW;
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0; // Stop all the TB clocks
EDIS;
EPwm1Regs.DBCTL.bit.POLSEL=DB_ACTV_HI;
EPwm2Regs.DBCTL.bit.POLSEL=DB_ACTV_HI;
EPwm3Regs.DBCTL.bit.POLSEL=DB_ACTV_HI;
EALLOW;
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 1; // Start all the timers synced
EDIS;
EPwm1Regs.AQSFRC.bit.RLDCSF=0x3;
EPwm2Regs.AQSFRC.bit.RLDCSF=0x3;
EPwm3Regs.AQSFRC.bit.RLDCSF=0x3;
EPwm1Regs.AQCSFRC.bit.CSFA=0x2;
EPwm2Regs.AQCSFRC.bit.CSFA=0x2;
EPwm3Regs.AQCSFRC.bit.CSFA=0x2;
先设置极性 不互补,然后都弄成低电平,具体寄存器 查手册 EPWM部分。追问你好,如果我要关断的是EPwm1。需要设置SysCtrlRegs.PCLKCR1.bit.EPwm1ENCLK=0么
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0; // Stop all the TB clocks
EDIS;
EPwm1Regs.DBCTL.bit.POLSEL=DB_ACTV_HI;
EPwm2Regs.DBCTL.bit.POLSEL=DB_ACTV_HI;
EPwm3Regs.DBCTL.bit.POLSEL=DB_ACTV_HI;
EALLOW;
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 1; // Start all the timers synced
EDIS;
EPwm1Regs.AQSFRC.bit.RLDCSF=0x3;
EPwm2Regs.AQSFRC.bit.RLDCSF=0x3;
EPwm3Regs.AQSFRC.bit.RLDCSF=0x3;
EPwm1Regs.AQCSFRC.bit.CSFA=0x2;
EPwm2Regs.AQCSFRC.bit.CSFA=0x2;
EPwm3Regs.AQCSFRC.bit.CSFA=0x2;
先设置极性 不互补,然后都弄成低电平,具体寄存器 查手册 EPWM部分。追问你好,如果我要关断的是EPwm1。需要设置SysCtrlRegs.PCLKCR1.bit.EPwm1ENCLK=0么
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯