ADSP-BF535 Blackfin Processor Hardware Reference
16-15
Timers
Listing 16-1. PWM Mode Initialization Sequence
/* A typical PWM mode initialization: */
#define lo(const32) (const32 & 0xFFFF)
#define hi(const32) ((const32 >> 16) & 0xFFFF)
PO.H = hi(TIMER0_CONFIG);
PO.L = lo(TIMER0_CONFIG);
R0.L = 0x0019;
W[P0] = R0.L;
/* */
PO.L = lo(TIMER0_PERIOD_HI);
W[P0] = R1.H;
PO.L = lo(TIMER0_PERIOD_LO);
W[P0] = R1.L;
/* */
PO.L = lo(TIMER0_WIDTH_HI);
W[P0] = R2.H;
PO.L = lo(TIMER0_WIDTH_LO);
W[P0] = R2.L;
/* */
PO.L = lo(TIMER0_STATUS);
R0.L = 0x0100;
W[P0] = R0.L;
SSYNC;
If enabled, a timer interrupt is generated at the end of each period. An
interrupt service routine must clear the interrupt latch bit (
IRQx
) and
might alter the period and/or width values. In PWM applications, the
software may need to update period and width values while the timer is
running. To guarantee coherency between Timer Period and Timer
Width registers, a buffer mechanism is used.
Содержание ADSP-BF535 Blackfin
Страница 80: ...Development Tools 1 26 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 312: ...Working With Memory 6 86 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 332: ...System Interfaces 7 20 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 360: ...Dynamic Power Management Controller 8 28 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 446: ...Beginning and Ending an SPI Transfer 10 40 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 522: ...Timing Examples 11 76 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 562: ...IrDA Support 12 40 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 608: ...PCI I O Issues 13 46 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 672: ...References 14 64 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 810: ...SDRAM Controller SDC 18 86 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 811: ...ADSP BF535 Blackfin Processor Hardware Reference 18 87 External Bus Interface Unit...
Страница 812: ...SDRAM Controller SDC 18 88 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 860: ...DMA Bus Debug Registers 20 30 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 908: ...SDRAM Controller External Bus Interface Unit B 36 ADSP BF535 Blackfin Processor Hardware Reference...