The PWM peripheral can be used to generate precisely timed one-shot pulses by first initializing
the other parts of
pwmcfg
then writing a 1 to the
pwmenoneshot
bit. The counter will run for one
PWM cycle, then once a reset condition occurs, the
pwmenoneshot
bit is reset in hardware to
prevent a second cycle.
The PWM can be configured to provide periodic counter interrupts by enabling auto-zeroing of
the count register when a comparator 0 fires (
pwmzerocmp
=1). The
pwmsticky
bit should also
be set to ensure interrupts are not forgotten while waiting to run a handler.
The interrupt pending bits
pwmcmp
ip
can be cleared down using writes to the
pwmcfg
register.
The PWM peripheral can also be used as a regular timer with no counter reset (
pwmzerocmp
=0),
where the comparators are now used to provide timer interrupts.
Copyright © 2019, SiFive Inc. All rights reserved.
102
Содержание FE310-G002
Страница 1: ...SiFive FE310 G002 Manual v19p05 SiFive Inc ...
Страница 11: ...Figure 1 FE310 G002 top level block diagram Copyright 2019 SiFive Inc All rights reserved 9 ...
Страница 15: ...Chapter 2 List of Abbreviations and Terms 13 ...
Страница 23: ...Chapter 4 Memory Map The memory map of the FE310 G002 is shown in Table 4 21 ...