General Operation
14-8
ADSP-BF50x Blackfin Processor Hardware Reference
shut-down action. Both interrupts are generated only when the corre-
sponding enable bits (
PWMSYNCINT_EN
and
PWMTRIPINT_EN
) are set in the
PWM_CTRL
register.
The
PWM_STAT
register provides status information about the PWM sys-
tem. In particular, the state of the
PWM_TRIP
pin (
PWM_TRIP
bit),
PWM_POLARITY
(
PWM_POL
bit), and
PWM_SRMODE
(
PWM_SR
bit) are available, as
well as a status bit (
PWM_PHASE
) that indicates whether operation is in the
first half or the second half of the PWM period. The
PWM_STAT
register
also reflects the status of the
PWM_SYNCINT
and
PWM_TRIPINT
interrupts,
which are set if enabled in the
PWM_CTRL
register. The latter two bits are
sticky; hence, the interrupt service routine must write-1-to-clear (W1C)
these bits.
General Operation
Typically, the
PWM_SYNCINT
interrupt is used to periodically execute an
interrupt service routine (ISR) to update the three PWM channel duties,
according to a control algorithm based on expected motor operation and
sampled data of the existing motor operation.
PWM_SYNC
can also trigger
the ADC to sample data for use during the ISR. During processor boot,
the PWM Controller is initialized and program flow enters a wait loop.
When a
PWM_SYNCINT
interrupt occurs, the ADC samples data, the data is
algorithmically interpreted, and then the new PWM channel duties are
calculated and written to the PWM registers. More sophisticated imple-
mentations include different start-up, run-time, and shut-down
algorithms to determine PWM channel duties, based on expected behavior
and further features.
During initialization, the
PWM_TM
register is written to define the PWM
period, and the
PWM_CHA
,
PWM_CHB
and
PWM_CHC
registers are written to
define the initial channel pulse widths. The
PWM_SYNCWT
,
PWM_GATE
,
PWM_SEG
,
PWM_CHAL
,
PWM_CHBL
and
PWM_CHCL
registers are written, depend-
ing on the system configuration and modes. The
PWM_STAT
register can be
Содержание EZ-KIT Lite ADSP-BF506F
Страница 50: ...Contents l ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 92: ...Development Tools 1 30 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 110: ...Interface Overview 3 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 132: ...Unique Information for the ADSP BF50x Processor 4 22 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 236: ...Internal Flash Memory Control Registers 6 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 342: ...Unique Information for the ADSP BF50x Processor 7 106 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 484: ...Unique Information for the ADSP BF50x Processor 10 60 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 493: ...ADSP BF50x Blackfin Processor Hardware Reference 11 9 Core Timer Unique Information for the ADSP BF50x Processor None ...
Страница 494: ...Unique Information for the ADSP BF50x Processor 11 10 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 506: ...Unique Information for the ADSP BF50x Processor 12 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 544: ...Unique Information for the ADSP BF50x Processor 13 38 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 650: ...Programming Examples 15 56 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 712: ...Unique Information for the ADSP BF50x Processor 16 62 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 804: ...Programming Examples 17 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 972: ...Unique Information for the ADSP BF50x Processor 20 38 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 1194: ...Programming Examples 24 90 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 1256: ...ACM Registers A 50 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 1264: ...Boundary Scan Architecture B 8 ADSP BF50x Blackfin Processor Hardware Reference ...