|
HFCC-01 Low-Level Software (LLSW) Rel_6802_HFCC-01-RP-CSAR-CB
|
Go to the source code of this file.
Functions | |
| ModStatus | modPwm_enable (const PWMChannelNum pwmChannel) |
| modPwm_enable. | |
| ModStatus | modPwm_disable (const PWMChannelNum pwmChannel) |
| modPwm_disable. | |
| ModStatus | modPwm_setFrequencyDutycycle (const PWMChannelNum pwmChannel, const UInt16 frequency, const UInt16 dutyCycle) |
| modPwm_setFrequencyDutycycle. | |
PWM Module
| ModStatus modPwm_disable | ( | const PWMChannelNum | pwmChannel | ) |
modPwm_disable.
To disable PWM for specific channel.
| [in] | pwmChannel | The PWM channel. |
| MD_SUCCESS | : Success. |
| MD_INVALID_INIT | : Module is not initialized in config . |
| MD_INVALID_CHANNEL | : Channel is not valid. |
| MD_READ_ERR | : Failed to read from the module. |
| MD_WRITE_ERR | : Failed to write to the module. |
| MD_OP_ALREADY_PERFORMED | : The pwm channel is already disabled. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_PWM_MODPWM_DISABLE_01 | HLR_PWM_23291 | WHEN pwmChannel is not one of the defined PWM output channel identifiers (PWM_CH1, PWM_CH2, PWM_CH3, PWM_CH4), the modPwm_disable() function SHALL abort processing and return MD_INVALID_CHANNEL. | modPwm.c:modPwm_disable() | Test | Closed |
| LLR_PWM_MODPWM_DISABLE_02 | HLR_PWM_23291 | WHEN the module initialization state is not initialized (INIT), the modPwm_disable() function SHALL abort processing and return MD_INVALID_INIT. | modPwm.c:modPwm_disable() | Test | Closed |
| LLR_PWM_MODPWM_DISABLE_03 | HLR_PWM_23291 | WHEN a driver operation reports a failure status other than DRV_SUCCESS, the modPwm_disable() function SHALL abort processing and return the module error code produced by errCheck() for the reported driver status. | modPwm.c:modPwm_disable() | Test | Closed |
| LLR_PWM_MODPWM_DISABLE_04 | HLR_PWM_23291 | WHEN preconditions are satisfied, the modPwm_disable() function SHALL invoke routine pwm_disable() to execute target subsystem hardware operation. | modPwm.c:modPwm_disable() | Test | Closed |
| LLR_PWM_MODPWM_DISABLE_05 | HLR_PWM_23291 | WHEN preconditions are satisfied, the modPwm_disable() function SHALL evaluate the driver return status using errCheck(). | modPwm.c:modPwm_disable() | Test | Closed |
| LLR_PWM_MODPWM_DISABLE_06 | HLR_PWM_23291 | WHEN all operational processing completes successfully, the modPwm_disable() function SHALL return MD_SUCCESS. | modPwm.c:modPwm_disable() | Test | Closed |
| ModStatus modPwm_enable | ( | const PWMChannelNum | pwmChannel | ) |
modPwm_enable.
To enable PWM for specific channel.
| [in] | pwmChannel | The PWM channel. |
| MD_SUCCESS | : Success. |
| MD_INVALID_INIT | : Module is not initialized in config. |
| MD_INVALID_CHANNEL | : Channel is not valid. |
| MD_INVALID_PARAM | : The provided address pointer is invalid. |
| MD_READ_ERR | : Failed to read from the module. |
| MD_WRITE_ERR | : Failed to write to the module. |
| MD_OP_ALREADY_PERFORMED | : The pwm channel is already enabled. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_PWM_MODPWM_ENABLE_01 | HLR_PWM_23291 | WHEN pwmChannel is not one of the defined PWM output channel identifiers (PWM_CH1, PWM_CH2, PWM_CH3, PWM_CH4), the modPwm_enable() function SHALL abort processing and return MD_INVALID_CHANNEL. | modPwm.c:modPwm_enable() | Test | Closed |
| LLR_PWM_MODPWM_ENABLE_02 | HLR_PWM_23291 | WHEN the module initialization state is not initialized (INIT), the modPwm_enable() function SHALL abort processing and return MD_INVALID_INIT. | modPwm.c:modPwm_enable() | Test | Closed |
| LLR_PWM_MODPWM_ENABLE_03 | HLR_PWM_23291 | WHEN a driver operation reports a failure status other than DRV_SUCCESS, the modPwm_enable() function SHALL abort processing and return the module error code produced by errCheck() for the reported driver status. | modPwm.c:modPwm_enable() | Test | Closed |
| LLR_PWM_MODPWM_ENABLE_04 | HLR_PWM_23291 | WHEN preconditions are satisfied, the modPwm_enable() function SHALL invoke routine pwm_enable() to execute target subsystem hardware operation. | modPwm.c:modPwm_enable() | Test | Closed |
| LLR_PWM_MODPWM_ENABLE_05 | HLR_PWM_23291 | WHEN preconditions are satisfied, the modPwm_enable() function SHALL evaluate the driver return status using errCheck(). | modPwm.c:modPwm_enable() | Test | Closed |
| LLR_PWM_MODPWM_ENABLE_06 | HLR_PWM_23291 | WHEN all operational processing completes successfully, the modPwm_enable() function SHALL return MD_SUCCESS. | modPwm.c:modPwm_enable() | Test | Closed |
| ModStatus modPwm_setFrequencyDutycycle | ( | const PWMChannelNum | pwmChannel, |
| const UInt16 | frequency, | ||
| const UInt16 | dutyCycle ) |
modPwm_setFrequencyDutycycle.
To set frequency duty cycle for PWM module.
| [in] | pwmChannel | PWM channel number to access. |
| [in] | frequency | PWM frequency in Hz (Max is 20000 Hz) [Hz]. |
| [in] | dutyCycle | PWM duty cycle in percentage, Value 0 - 100 % [%]. |
| MD_SUCCESS | : Success. |
| MD_INVALID_INIT | : Module is not initialized in config. |
| MD_INVALID_CHANNEL | : Channel is not valid. |
| MD_INVALID_VALUE | : Frequency or duty cycle value exceed limit. |
| MD_READ_ERR | : Failed to read from the module. |
| MD_WRITE_ERR | : Failed to write to the module. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_PWM_MODPWM_SETFREQUENCYDUTYCYCLE_01 | HLR_PWM_23289 | WHEN pwmChannel is not one of the defined PWM output channel identifiers (PWM_CH1, PWM_CH2, PWM_CH3, PWM_CH4), the modPwm_setFrequencyDutycycle() function SHALL abort processing and return MD_INVALID_CHANNEL. | modPwm.c:modPwm_setFrequencyDutycycle() | Test | Closed |
| LLR_PWM_MODPWM_SETFREQUENCYDUTYCYCLE_02 | HLR_PWM_23289 | WHEN the module initialization state is not initialized (INIT), the modPwm_setFrequencyDutycycle() function SHALL abort processing and return MD_INVALID_INIT. | modPwm.c:modPwm_setFrequencyDutycycle() | Test | Closed |
| LLR_PWM_MODPWM_SETFREQUENCYDUTYCYCLE_03 | HLR_PWM_23289 | WHEN frequency is greater than MOD_PWM_MAX_FREQ, the modPwm_setFrequencyDutycycle() function SHALL abort processing and return MD_INVALID_VALUE. | modPwm.c:modPwm_setFrequencyDutycycle() | Test | Closed |
| LLR_PWM_MODPWM_SETFREQUENCYDUTYCYCLE_04 | HLR_PWM_23289 | WHEN dutyCycle is greater than PWM_DUTY_CYCLE_MAX, the modPwm_setFrequencyDutycycle() function SHALL abort processing and return MD_INVALID_VALUE. | modPwm.c:modPwm_setFrequencyDutycycle() | Test | Closed |
| LLR_PWM_MODPWM_SETFREQUENCYDUTYCYCLE_05 | HLR_PWM_23289 | WHEN a driver operation reports a failure status other than DRV_SUCCESS, the modPwm_setFrequencyDutycycle() function SHALL abort processing and return the module error code produced by errCheck() for the reported driver status. | modPwm.c:modPwm_setFrequencyDutycycle() | Test | Closed |
| LLR_PWM_MODPWM_SETFREQUENCYDUTYCYCLE_06 | HLR_PWM_23289 | WHEN preconditions are satisfied, the modPwm_setFrequencyDutycycle() function SHALL invoke routine pwm_setFrequencyDutycycle() to execute target subsystem hardware operation. | modPwm.c:modPwm_setFrequencyDutycycle() | Test | Closed |
| LLR_PWM_MODPWM_SETFREQUENCYDUTYCYCLE_07 | HLR_PWM_23289 | WHEN preconditions are satisfied, the modPwm_setFrequencyDutycycle() function SHALL evaluate the driver return status using errCheck(). | modPwm.c:modPwm_setFrequencyDutycycle() | Test | Closed |
| LLR_PWM_MODPWM_SETFREQUENCYDUTYCYCLE_08 | HLR_PWM_23289 | WHEN all operational processing completes successfully, the modPwm_setFrequencyDutycycle() function SHALL return MD_SUCCESS. | modPwm.c:modPwm_setFrequencyDutycycle() | Test | Closed |