CLASSIC
Modul: pwm
Rolle: constitutive
Konfidenz: 95%
SNIP_CLASSIC_PWM_SECTION_8_3_9_Pwm_SetPowerState
Wortlaut
8.3.9 Pwm_SetPowerState
[SWS_Pwm_00166] Definition of API function Pwm_SetPowerState ⌈
Service Name
Pwm_SetPowerState
Syntax
Std_ReturnType Pwm_SetPowerState (
Pwm_PowerStateRequestResultType* Result
)
Service ID [hex]
0x09
Sync/Async
Synchronous
Reentrancy
Non Reentrant
Parameters (in)
None
Parameters (inout)
None
Parameters (out)
Result
If the API returns E_OK: PWM_SERVICE_ACCEPTED:Power
state change executed.
If the API returns E_NOT_OK: PWM_NOT_INIT: PWM Module
not initialized. PWM_SEQUENCE_ERROR: wrong API call
sequence. PWM_HW_FAILURE: the HW module has a failure
which prevents it to enter the required power state.
Return value
Std_ReturnType
E_OK: Power Mode changed
E_NOT_OK: request rejected
Description
This API configures the Pwm module so that it enters the already prepared power state, chosen
between a predefined set of configured ones.
Available via
Pwm.h
⌋
[SWS_Pwm_00167] ⌈The API configures the HW in order to enter the given Power
State. All preliminary actions to enable this transition (e.g. setting all channels in IDLE
status, de-registering of all notifications and so on) must already have been taken by
the responsible SWCs (e.g. IoHwAbs).
The API shall not execute preliminary, implicit power state changes (i.e. if a requested
power state is not reachable starting from the current one, no intermediate power state
change shall be executed and the request shall be rejected).⌋
[SWS_Pwm_00168] ⌈In case the target power state is the same as the current one,
no action is executed and the API returns immediately with an E_OK result.⌋
[SWS_Pwm_00169] ⌈In case the normal Power State is requested, the API shall refer
to the necessary parameters contained in the same containers used by Pwm_Init.
No separate container or hard coded data shall be used for the normal (i.e. full) power
mode, in order to avoid misalignments between initialization parameters used during
the init phase and during a power state change.⌋
[SWS_Pwm_00170] ⌈For the other power states, only power state transition specific
reconfigurations shall be executed in the context of this API (i.e. the API cannot be
used to apply a completely new configuration to the Pwm module).
Any other reconfiguration not strictly related to the power state transition shall not take place.⌋
[SWS_Pwm_00171] ⌈The API shall refer to the configuration container related to the
required Power State in order to derive some specific features of the state (e.g support
of Power States).⌋
In case development error reporting is activated:
[SWS_Pwm_00172] ⌈The API shall report the development error PWM_E_UNINIT in
case this API is called before having initialized the HW unit.⌋
[SWS_Pwm_00173] ⌈The API shall report the runtime error PWM_E_NOT_DISENGAGED in case this API is called when one or more HW channels (where applicable)
are in a state different than IDLE (or similar non-operational states) and/or there are
still notification registered for the HW module channels.⌋
[SWS_Pwm_00194] ⌈The API shall report the development error PWM_E_POWER_STATE_NOT_SUPPORTED in case this API is called with an unsupported power state
or the peripheral does not support low power states at all.⌋
[SWS_Pwm_00195]
⌈The
API
shall
report
the
development
error
PWM_E_TRANSITION_NOT_POSSIBLE in case the requested power state cannot be directly
reached from the current power state.⌋
[SWS_Pwm_00196]
⌈The
API
shall
report
the
development
error
PWM_E_PERIPHERAL_NOT_PREPARED in case the HW unit has not been previously prepared
for the target power state by use of the API Pwm_PreparePowerState.⌋
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Cited verbatim in the snippet (deterministic citation).
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_PWMDriver.pdf |
|---|---|
| Dokumentseite | Seite 36 |
| Ziel-Modul | pwm (classic) |
| Ziel-Anforderung | SWS_Std_00005 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |