EasyManuals Logo

Texas Instruments C28 Series Student Guide

Texas Instruments C28 Series
342 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #62 background imageLoading...
Page #62 background image
Example Usage Flow
EALLOW; // This is needed to write to EALLOW protected registers
PieVectTable.TINT0 = &cpu_timer0_isr;
EDIS; // This is needed to disable write to EALLOW protected registers
// Include application specific functions. This is for this example:
// Configure CPU-Timer 0 to interrupt every second:
ConfigCpuTimer(&CpuTimer0, 100, 1000000); // 100MHz CPU Freq, 1 second
// Period (in uSeconds)
StartCpuTimer0();
// Enable CPU INT1 which is connected to CPU-Timer 0:
IER |= M_INT1;
// Enable TINT0 in the PIE: Group 1 interrupt 7
PieCtrlRegs.PIEIER1.bit.INTx7 = 1;
// Enable global Interrupts and higher priority real-time debug events:
EINT; // Enable Global interrupt INTM
ERTM; // Enable Global realtime interrupt DBGM
// Step 6. IDLE loop. Just sit and loop forever (optional):
for(;;);
}
// Step 7. Insert all local Interrupt Service Routines (ISRs) and functions
here:
// If local ISRs are used, reassign vector addresses in vector table as
// shown in Step 5
interrupt void cpu_timer0_isr(void)
{
CpuTimer0.InterruptCount++;
// Acknowledge this interrupt to recieve more interrupts from group 1
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
}
3 - 14 C28x - Peripheral Registers Header Files

Table of Contents

Other manuals for Texas Instruments C28 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments C28 Series and is the answer not in the manual?

Texas Instruments C28 Series Specifications

General IconGeneral
BrandTexas Instruments
ModelC28 Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals