コード例 #1
0
__interrupt void epwm1_tzint_isr(void)
{
    EPwm1TZIntCount++;

    // Leave the PWM flags set so we only take this
    // interrupt once

    // Acknowledge this interrupt to receive more interrupts from group 2
    PIE_clearInt(myPie, PIE_GroupNumber_2);
}
コード例 #2
0
__interrupt void epwm3_timer_isr(void)
{
    EPwm3TimerIntCount++;

    // Clear INT flag for this timer
    PWM_clearIntFlag(myPwm3);

    // Acknowledge this interrupt to receive more interrupts from group 3
    PIE_clearInt(myPie, PIE_GroupNumber_3);
}
コード例 #3
0
ファイル: Example_2802xEPwmUpAQ.c プロジェクト: smarley2/PSE
__interrupt void epwm3_isr(void)
{
    // Update the CMPA and CMPB values
    update_compare(&epwm3_info);

    // Clear INT flag for this timer
    PWM_clearIntFlag(myPwm3);

    // Acknowledge this interrupt to receive more interrupts from group 3
    PIE_clearInt(myPie, PIE_GroupNumber_3);
}
コード例 #4
0
// This ISR MUST be executed from RAM as it will put the Flash into Standby
interrupt void EPwm2_timer_isr(void)
{
    EPwm2TimerIntCount++;

    // Put the Flash into standby
    FLASH_setPowerMode(myFlash, FLASH_PowerMode_PumpAndBankStandby);

    // Clear INT flag for this timer
    PWM_clearIntFlag(myPwm2);

    // Clear this interrupt to receive more interrupts from group 3
    PIE_clearInt(myPie, PIE_GroupNumber_3);
}
コード例 #5
0
// This ISR MUST be executed from RAM as it will put the Flash into Sleep
// Interrupt routines uses in this example:
interrupt void EPwm1_timer_isr(void)
{

    // Put the Flash to sleep
    FLASH_setPowerMode(myFlash, FLASH_PowerMode_PumpAndBankSleep);

    EPwm1TimerIntCount++;

    // Clear INT flag for this timer
    PWM_clearIntFlag(myPwm1);

    // Clear this interrupt to receive more interrupts from group 3
    PIE_clearInt(myPie, PIE_GroupNumber_3);
}
コード例 #6
0
interrupt void EPwm3_timer_isr(void)
{
    uint16_t i;

    EPwm3TimerIntCount++;

    // Short Delay to simulate some ISR Code
    for(i = 1; i < 0x01FF; i++) {}

    // Clear INT flag for this timer
    PWM_clearIntFlag(myPwm3);

    // Clear this interrupt to receive more interrupts from group 3
    PIE_clearInt(myPie, PIE_GroupNumber_3);
}
コード例 #7
0
ファイル: proj_lab05b.c プロジェクト: TI-MCU/CSS_Git_Test
__interrupt void ecapISR(void)
{
    // Clear capture (CAP) interrupt flags
    CAP_clearInt(halHandle->capHandle, CAP_Int_Type_All);

    // Compute the PWM high period (rising edge to falling edge)
    uint32_t PwmDuty = (uint32_t) CAP_getCap2(halHandle->capHandle) - (uint32_t) CAP_getCap1(halHandle->capHandle);

    // Assign the appropriate speed command, combine 0-5% and 95-100%
    // 0-100% speed is proportional to 1-2ms high period
    // 60MHz * 2ms = 120000

    // 0-1%
    if (PwmDuty <= 61000)
    {
        gSpeedRef_Ok = 0;
        gSpeedRef_duty = _IQ(0);
        gMotorVars.Flag_Run_Identify = 0;
    }
    // 1-99%
    if ((PwmDuty > 61000) && (PwmDuty < 119000))
    {
        gSpeedRef_Ok = 0;
        gSpeedRef_duty = _IQdiv(PwmDuty - 60000, 60000);
        gMotorVars.Flag_Run_Identify = 1;
    }
    // 99-100%
    else if (PwmDuty >= 119000)
    {
        gSpeedRef_Ok = 0;
        gSpeedRef_duty = _IQ(1.0);
        gMotorVars.Flag_Run_Identify = 1;
    }
    // Catch all
    else
    {
        gSpeedRef_duty = _IQ(0);
        gMotorVars.Flag_Run_Identify = 0;
    }

    // Clears an interrupt defined by group number
    PIE_clearInt(halHandle->pieHandle, PIE_GroupNumber_4);
}  // end of ecapISR() function
コード例 #8
0
ファイル: main.c プロジェクト: eceforge/vitasign
interrupt void i2c_int1(void){
	isr_counter++;
	Uint16 IntSource;

	IntSource = I2caRegs.I2CISRC.all;

	if( IntSource == I2C_AAS_ISRC){
		num_rec_slave_addr++;
	}

	if (IntSource == I2C_TX_ISRC){

		num_bytes_moved_to_tx_shift ++;
		I2caRegs.I2CSTR.bit.XRDY = 1; // Clear the XRDY interrupt (re-arm it) since it does not get auto-cleared by reading I2CISRC
		I2caRegs.I2CDXR = 0xF5; // Fill the transmission buffer
	}


	// Acknowledge this interrupt to receive more interrupts from group 8
	PIE_clearInt(myPie, PIE_GroupNumber_8);
}