AN07-00180-3E
When SW2 is pressed, an interrupt takes place. Around Line 763 in MAIN.C, the interrupt function
IRQ_ext_0 is invoked as shown in “ Figure 4-12 SW2 interrupt ”. In it, the register value of
TCCSL0_STOP, which is used to start/top the free-run timer, is changed.
__interrupt void IRQ_ext_0(void)
{
(omitted)
if(gMtStatus == MTST_STOP){
(omitted)
}else{
TCCSL0_STOP = 0;
(omitted)
TCCSL0_STOP = 1;
←Start of the free -run timer
←Stop of the free -run timer
}
(omitted)
}
Figure 4-12 SW2 interrupt
Once the free-run timer starts running, the timer interrupt function IRQ_FreeRunComp of motor_drv.c is
invoked on every carrier peak as shown in “ Figure 4-13 Free-run timer interrupt ”. In it, the status of the
hall elements is checked and configured into the macro.
__interrupt void IRQ_FreeRunComp(void)
{
if(TCCSH0_ICLR == 1)
{
/* if OCU interrupt */
mtPWMController();
←Macro configuration
(omitted)
}
}
Figure 4-13 Free-run timer interrupt
- 77 -
相关PDF资料
CANADAPT28 KIT ADAPTER CANDEMOBOARD 28PLCC
CAT24AA01WI-GT3 IC EEPROM SERIAL 1KB I2C 8SOIC
CAT24AA02WI-G IC EEPROM SERIAL 2KB I2C 8SOIC
CAT24C01ZI-G IC EEPROM SERIAL 1KB I2C 8MSOP
CAT24C03WI-G IC EEPROM SERIAL 2KB I2C 8SOIC
CAT24C04ZI-G IC EEPROM SERIAL 4KB I2C 8MSOP
CAT24C05YI-G IC EEPROM SERIAL 4KB I2C 8TSSOP
CAT24C08TDI-GT3 8KB I2C SER EEPROM TSOT 23
相关代理商/技术参数
CAN1671-15S 制造商:Techspray 功能描述:TECHSPRAY DUSTER 15 OZ FILL
CAN1747-10S 制造商:Techspray 功能描述:
CAN-24 制造商:Mencom 功能描述:
CAN4311111002451K 制造商:Yageo Corporation 功能描述:ANTENNA BLUETOOTH 2.45GHZ 制造商:Yageo / Phycomp 功能描述:ANTENNA, BLUETOOTH, 2.45GHZ
CAN4311111002701K 制造商:Yageo Corporation 功能描述:
CAN4311112001881K 制造商:Yageo Corporation 功能描述:
CAN4311113011582K 制造商:Yageo Corporation 功能描述:6230 Multilayer Ceramic Chip Antenna 制造商:Yageo Corporation 功能描述:6320 Multilayer Ceramic Chip Antenna
CAN4311115002451K 制造商:Yageo Corporation 功能描述: