This chapter describes the operation of the Pulse-Width Modulation peripheral (PWM).
Figure 10 shows an overview of the PWM peripheral. The default configuration described here
has four independent PWM comparators (
pwmcmp0
–
pwmcmp3
), but each PWM Peripheral is
parameterized by the number of comparators it has (
ncmp
). The PWM block can generate multi-
ple types of waveforms on output pins (
pwm
gpio
) and can also be used to generate several
forms of internal timer interrupt. The comparator results are captured in the
pwmcmp
ip
flops
and then fed to the PLIC as potential interrupt sources. The
pwmcmp
ip
outputs are further
processed by an output ganging stage before being fed to the GPIOs.
PWM instances can support comparator precisions (
cmpwidth
) up to 16 bits, with the example
described here having the full 16 bits. To support clock scaling, the
pwmcount
register is 15 bits
wider than the comparator precision
cmpwidth
.
FE310-G003 Manual
© SiFive, Inc.
Page 99
Содержание FE310-G003
Страница 1: ...SiFive FE310 G003 Manual v1p1 SiFive Inc ...