Part Number: TMS320F28377S
Tool/software: Code Composer Studio
interrupt void cpu_timer0_isr(void)
{
//
// Start Cpu Timer1 to indicate begin of interrupt
//
CpuTimer1Regs.TCR.all = 0x0000;
//
// Write current sine value to buffered DAC
//
DAC_PTR[DAC_NUM]->DACVALS.all = sgen_out;
//
// Log current sine value
//
dlog(sgen_out);
//
// Compute next sine value
//
sgen.calc(&sgen);
//
// Scale next sine value
//
sgen_out = (sgen.out + 32768) >> 4;
//
// Acknowledge this interrupt to receive more interrupts from group 1
//
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
//
// Stop Cpu Timer1 to indicate end of interrupt
//
CpuTimer1Regs.TCR.all = 0x0010;
//
// Calculate interrupt duration in cycles
//
interruptCycles = 0xFFFFFFFFUL - CpuTimer1Regs.TIM.all;
//
// Calculate interrupt duration in micro seconds
//
interruptDuration_us = cpuPeriod_us * interruptCycles;
//
// Reload Cpu Timer1
//
CpuTimer1Regs.TCR.all = 0x0030;
}
how do the above few lines actually work?