HWA
Bare metal programming with style
|
This class is used by:
counter2
The only difference between this class and the _cta class is the different clocking possibilities.
(COUNTER,prescaler)
: class _psa prescaler(COUNTER,compare0)
: class _oca compare unit with waveform generator;(COUNTER,compare1)
: class _oca compare unit with waveform generator.(COUNTER,irq)
, (COUNTER,irq,overflow)
: triggered when the counter counts from "max" to 0 (after_max
) in up_loop
counting mode, or when it counts from 0 to 1 (after_bottom
) in updown_loop
counting mode.
hwa( configure, ... ): configure the counting unit
overflow
is not stated, an acceptable value will be selected according to the configuration of the compare units found in the HWA context. If overflow
is stated, the validity of its value will be verified.
hw( read, ... ): get the count
hw( write, ... ), hwa( write, ... ): set the count
Hardware registers:
ccra
: control register accrb
: control register bcount
: count registerimsk
: interrupt mask registerifr
: interrupt flag registerassr
: asynchronous status registerLogical registers:
wgm
: counting and waveform generation modecs
: clock selectionie
: overflow interrupt maskif
: overflow interrupt flag