Analog Devices SHARC ADSP-2136 Series Hardware Reference Manual page 360

Table of Contents

Advertisement

Interrupts
Interrupts
For interrupt execution, the specific
register must be set including the
PWMCTLx
on the programmable interrupt to be used.
Whenever a period starts, the PWM interrupt is generated. Since all four
PWM units share the same interrupt vector, the interrupt service routine
should read the
interrupt. Next, the ISR clears the status bits of the
explicitly writing 1.
Debug Features
The module contains four debug status registers (
be used for debug aid. Each register is available per unit. The registers
return current status information about the AH, AL, BH, BL output pins.
Programming Example
Listing 10-1
shows the four steps used to configure a PWM module.
Listing 10-1. Generic PWM Configuration Example
#include <def21364.h>
#include <sru21364.h>
#include <SRU.h>
/* define for PWM frequency used in PWMPERIOD0 */
#define fPWM 0x1388;
call Int_enable;
10-24
www.BDTIC.com/ADI
register in order to determine the source of the
PWMGSTAT
/* 200MHz/2(20kHz) => 50us */
ADSP-2136x SHARC Processor Hardware Reference
for the ADSP-21362/3/4/5/6 Processors
bit in the corresponding
PWM_IRQEN
or
IMASK
LIRPTL
PWMGSTAT
PWMDBG3–0
registers based
register by
), which can

Advertisement

Table of Contents
loading

Table of Contents