DocID026248 Rev 1
13/21
UM1753
STLUX library
21
3.6 STLUX385A
system
timer (stlux_stmr)
Table 6. STLUX385A system timer
Header
Input parameters
Output
parameters
Functionality
STMR_Reset
Sets the STMR internal
registers to their default
initialization values.
STMR_TimeBaseInit
STMR_Prescaler specifies the
prescaler division factor for the
STMR. It can be a power of two
ranging from 1 to 128.
STMR_Period specifies the period to
be set for the timer interrupt
generation.
Initializes the STMR time
base unit according to the
specified parameters.
STMR_Cmd
NewState: it can be ENABLE or
DISABLE.
This function enables or
disables the STMR
peripheral.
STMR_ITConfig
STMR_IT specifies whether the
STMR interrupt must be enabled or
disabled.
NewState can be ENABLE or
DISABLE.
Enables or disables the
specified STMR
interrupts.
STMR_UpdateDisableConfig
Newstate can be ENABLE or
DISABLE.
Enables or disables the
update event for the auto-
reload preload mode.
STMR_UpdateRequestConfig
STMR_UpdateSource specifies
whether the interrupt is generated by
counter overflow only or by registers
update. Possible values are
UPDATESOURCE_GLOBAL and
UPDATESOURCE_REGULAR.
Selects the STMR Update
Request Interrupt source.
STMR_SelectOnePulseMode
STMR_OPMode specifies if the one
pulse mode must be activated.
Enables or disables the
one pulse. This mode
makes the counter stop
when the next update
event is triggered.
STMR_PrescalerConfig
Prescaler specifies the prescaler
division factor for the STMR. It can
be a power of two ranging from 1 to
128.
STMR_PSCReloadMode specifies
whether the prescaler is loaded
immediately or at the update event.
This function configures
the STMR prescaler.
STMR_ARRPreloadConfig
Newstate can be ENABLE or
DISABLE.
Enables or disables
STMR peripheral on auto-
reload preload enable
register.