ADSP-2126x SHARC Processor Hardware Reference
14-15
Peripheral Timer
#define TIM0EN 0x00000100
/* Main code section */
.global _main;
.section/pm seg_pmco;
_main:
/* Route Timer 0 Input to DAI Pin 1 via SRU */
r0 = (DAI_PB01_O<<TIMER0_I);
dm(SRU_EXT_MISCB)=r0;
ustat3 = TIMODEEXT| /* External Watchdog Mode */
PULSE| /* Positive edge is active */
IRQEN| /* Enable Timer 0 interrupt */
PRDCNT; /* Count to end of period */
dm(TM0CTL) = ustat3;
R0 = 0xff;
dm(TM0PRD) = R0; /* Timer 0 period = 255 */
/* An interrupt is generated when the Timer senses end of the
selected period, In this example Interrupts are disabled, so pro-
gram flow will not be affected */
R0 = TIM0EN; /* Enable timer 0 */
dm(TMSTAT) = R0;
_main.end: jump (pc,0); /* endless loop */
Listing 14-2. PWMOUT and Width Capture Mode Example
/* Register Definitions */
#define TMSTAT (0x1400) /* GP Timer 0 Status register */
#define TM0CTL (0x1401) /* GP Timer 0 Control register */
#define TM0CNT (0x1402) /* GP Timer 0 Count register */
Summary of Contents for ADSP-21261 SHARC
Page 30: ...Contents xxx ADSP 2126x SHARC Processor Hardware Reference ...
Page 40: ...Register Diagram Conventions xl ADSP 2126x SHARC Processor Hardware Reference ...
Page 58: ...Differences From Previous SHARCs 1 18 ADSP 2126x SHARC Processor Hardware Reference ...
Page 112: ...Secondary Processing Element PEy 2 54 ADSP 2126x SHARC Processor Hardware Reference ...
Page 178: ...Summary 3 66 ADSP 2126x SHARC Processor Hardware Reference ...
Page 204: ...DAG Instruction Summary 4 26 ADSP 2126x SHARC Processor Hardware Reference ...
Page 322: ...Setting Up DMA 7 32 ADSP 2126x SHARC Processor Hardware Reference ...
Page 436: ...SPORT Programming Examples 9 86 ADSP 2126x SHARC Processor Hardware Reference ...
Page 521: ...ADSP 2126x SHARC Processor Hardware Reference 11 31 Input Data Port rts IDP_ISR end ...
Page 522: ...Input Data Port Programming Example 11 32 ADSP 2126x SHARC Processor Hardware Reference ...
Page 590: ...Timer Programming Examples 14 20 ADSP 2126x SHARC Processor Hardware Reference ...
Page 796: ...I O Processor Registers A 174 ADSP 2126x SHARC Processor Hardware Reference ...
Page 800: ...B 4 ADSP 2126x SHARC Processor Core Manual ...
Page 846: ...Index I 36 ADSP 2126x SHARC Processor Hardware Reference ...