Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 230855

Forum Post: CCS/TMS320F28377S: regarding the cpu timer isr in buff dac sine generation

$
0
0
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?

Viewing all articles
Browse latest Browse all 230855

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>