微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 硬件电路设计 > TI电源管理交流 > UCD3138A64快速中断怎么设置?我想设置快速中断fault3,可是利用下面的代码没有实现,还请大神能够指点下,问题出现在哪

UCD3138A64快速中断怎么设置?我想设置快速中断fault3,可是利用下面的代码没有实现,还请大神能够指点下,问题出现在哪

时间:10-02 整理:3721RD 点击:

 TimerRegs.T16PWM2CMP0DAT.all =1562;   //40hz 1562;   //Threshold to reset counter - 15.625 mHz/10 KHz.
 TimerRegs.T16PWM2CMPCTRL.all = 2;  //Enables compare 0 (reset) interrupt
 TimerRegs.T16PWM2CNTCTRL.all = 0x00c; //PWM counter is running & enables PWM counter reset by compare action on compare 0
 disable_fast_interrupt(); //make sure fast interrupt is disabled

 disable_interrupt();

// write_reqmask(CIMINT_ALL_PWM2_COMP);    // | CIMINT_ALL_FAULT_PIN);

 write_reqmask(CIMINT_ALL_FAULT_PIN|CIMINT_ALL_PWM2_COMP);//(0x02020000); //enable FAULT_INT and PWM0_INT
 write_firqpr (CIMINT_ALL_FAULT_PIN);                     //(0x02000000); //make them all irqs except FAULT_INT
 enable_fast_interrupt(); //make sure fast interrupt is enabled for OVP shutdown

 enable_interrupt();   

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top