This module contains APIs for device driver pruicss_pwm supported in this SDK.
PRUICSS has one pwm module, which has four pwm sets (PWM0, PWM1, PWM2, PWM3) Each Set has six signals (A0,A1,A2,B0,B1,B2) With Reference to Technical Reference Manual, Pwm six signals(A0,A1,A2,B0,B1,B2) Naming convention is slightly different
PWMn==============>PWMn_0=========>PWMn_0_POS (alias signal A0) | |=====>PWMn_0_NEG (alias signal B0) | | | |=========>PWMn_1=========>PWMn_1_POS (alias signal A1) | |=====>PWMn_1_NEG (alias signal B1) | | | |=========>PWMn_2=========>PWMn_2_POS (alias signal A2) |=====>PWMn_2_NEG (alias signal B2)
Each Set has one trip zone output OR logic block Each trip zone block has nine trip_error signals (trip_e1_[0:2], trip_e2, trip_e3[0:2], trip_e4, trip_e5) as input And one PWMn_TZ_OUT output signal which makes transition to safe or trip state from current state
________________ tripn_e1_[2:0](Debounce Trip)----------------------->| | | | tripn_e2(Debounce Error Trip_in)-------------------->| | _____________ | | | | trip_e3[2:0](SD Fast detect Error Trip)------------->| Tripzone |------------->|PWMn_TZ_OUT| | output | |___________| | logic | trip_e4(SD over current Error Trip)----------------->| | | | trip_e5(Position Error trip)------------------------>| | |________________|
Data Structures | |
struct | PRUICSS_PWM_IEP_Attrs |
PRUICSS PWM IEP Attributes. More... | |
struct | PRUICSS_PWM_Attrs |
PRUICSS PWM Attributes. More... | |
struct | PRUICSS_PWM_Config |
PRUICSS PWM Global configuration structure. More... | |
Functions | |
PRUICSS_PWM_Handle | PRUICSS_PWM_open (uint32_t index, PRUICSS_Handle pruIcssHandle) |
This function returns the handle for a PRUICSS PWM instance. More... | |
int32_t | PRUICSS_PWM_setIepCounterLower_32bitValue (PRUICSS_PWM_Handle handle, uint8_t iepInstance, uint32_t value) |
This API writes Lower_32bit Value of IEP counter in IEP module. More... | |
int32_t | PRUICSS_PWM_setIepCounterUpper_32bitValue (PRUICSS_PWM_Handle handle, uint8_t iepInstance, uint32_t value) |
This API writes Upper_32bit Value of IEP counter in IEP module. More... | |
int32_t | PRUICSS_PWM_configureIepShadowModeEnable (PRUICSS_PWM_Handle handle, uint8_t iepInstance, uint8_t enable) |
This API sets enables/disables of IEP shadow mode. More... | |
int32_t | PRUICSS_PWM_configureIepCmp0ResetEnable (PRUICSS_PWM_Handle handle, uint8_t iepInstance, uint8_t enable) |
This API sets enables/disables of IEP counter reset on compare 0 event in IEP module. More... | |
int32_t | PRUICSS_PWM_configureIepCompareEnable (PRUICSS_PWM_Handle handle, uint8_t iepInstance, uint16_t value) |
This API sets enables/disables compare events in IEP module. More... | |
int32_t | PRUICSS_PWM_setIepCompareEventLower_32bitValue (PRUICSS_PWM_Handle handle, uint8_t iepInstance, uint8_t cmpEvent, uint32_t value) |
This API writes Lower_32bit Value of compare event in IEP module. More... | |
int32_t | PRUICSS_PWM_setIepCompareEventUpper_32bitValue (PRUICSS_PWM_Handle handle, uint8_t iepInstance, uint8_t cmpEvent, uint32_t value) |
This API writes Upper_32bit Value of compare event in IEP module. More... | |
int32_t | PRUICSS_PWM_setPwmDebounceValue (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint8_t value) |
This API updates Debounce Value for specified pwm set. More... | |
int32_t | PRUICSS_PWM_setPwmTripMask (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint16_t maskValue) |
This API updates TripMask Value for specified pwm set. More... | |
int32_t | PRUICSS_PWM_getPwmTripMask (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint16_t *maskValuePtr) |
Get trip mask Value for specified pwm set. More... | |
int32_t | PRUICSS_PWM_configurePwmCmp0TripResetEnable (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint8_t enable) |
This API enables/disables TripReset on Compare_0 Event for specified pwm set. More... | |
int32_t | PRUICSS_PWM_generatePwmTripReset (PRUICSS_PWM_Handle handle, uint8_t pwmSet) |
This API generates Software Trip Reset by writing 1 to bit field for specified pwm set. More... | |
int32_t | PRUICSS_PWM_generatePwmOverCurrentErrorTrip (PRUICSS_PWM_Handle handle, uint8_t pwmSet) |
This API generates Software Over current error trip by writing 1 to bit field for specified pwm set. More... | |
int32_t | PRUICSS_PWM_generatePwmPositionFeedbackErrorTrip (PRUICSS_PWM_Handle handle, uint8_t pwmSet) |
This API generates Software Position Feedback Error Trip by writing 1 to bit field for specified pwm set. More... | |
int32_t | PRUICSS_PWM_clearPwmTripResetStatus (PRUICSS_PWM_Handle handle, uint8_t pwmSet) |
This API clears Software Trip Reset by writing 0 to bit field for specified pwm set. More... | |
int32_t | PRUICSS_PWM_clearPwmOverCurrentErrorTrip (PRUICSS_PWM_Handle handle, uint8_t pwmSet) |
This API clears Software Over current error trip by writing 0 to bit field for specified pwm set. More... | |
int32_t | PRUICSS_PWM_clearPwmPositionFeedbackErrorTrip (PRUICSS_PWM_Handle handle, uint8_t pwmSet) |
This API clears Software Position Feedback Error Trip by writing 0 to bit field for specified pwm set. More... | |
int32_t | PRUICSS_PWM_getPwmTripTriggerCauseVector (PRUICSS_PWM_Handle handle, uint8_t pwmSet) |
This API returns Trip trigger cause vector for specified pwm set. More... | |
int32_t | PRUICSS_PWM_getPwmTripStatus (PRUICSS_PWM_Handle handle, uint8_t pwmSet) |
This API returns Trip status for specified pwm set. More... | |
int32_t | PRUICSS_PWM_clearPwmTripStatus (PRUICSS_PWM_Handle handle, uint8_t pwmSet) |
This API clears Trip status and makes state transition to Intial state as follows (Active->Intial) or (Trip->Intial) for specified pwm set. More... | |
int32_t | PRUICSS_PWM_actionOnOutputCfgPwmSignalA0 (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint8_t state, uint8_t action) |
This API updates output action for specified state of A0 signal for specified PWM set. More... | |
int32_t | PRUICSS_PWM_actionOnOutputCfgPwmSignalA1 (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint8_t state, uint8_t action) |
This API updates output action for specified state of A1 signal for specified PWM set. More... | |
int32_t | PRUICSS_PWM_actionOnOutputCfgPwmSignalA2 (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint8_t state, uint8_t action) |
This API updates output action for specified state of A2 signal for specified PWM set. More... | |
int32_t | PRUICSS_PWM_actionOnOutputCfgPwmSignalB0 (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint8_t state, uint8_t action) |
This API updates output action for specified state of B0 signal for specified PWM set. More... | |
int32_t | PRUICSS_PWM_actionOnOutputCfgPwmSignalB1 (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint8_t state, uint8_t action) |
This API updates output action for specified state of B1 signal for specified PWM set. More... | |
int32_t | PRUICSS_PWM_actionOnOutputCfgPwmSignalB2 (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint8_t state, uint8_t action) |
This API updates output action for specified state of B2 signal for specified PWM set. More... | |
int32_t | PRUICSS_PWM_configurePwmEfficiencyModeEnable (PRUICSS_PWM_Handle handle, uint8_t enable) |
This API enables Efficiency mode In Efficiency mode Pwm state machine will go from Idle to Active and the same time Pwm output will get updated during this state transition And IEP Cmp flags will get auto HW cleared. More... | |
int32_t | PRUICSS_PWM_enableIEP1Slave (PRUICSS_PWM_Handle handle, uint8_t enable) |
This function enables IEP1 counter follow IEP0 counter when Enabled IEP1 counter acts as slave IEP1 counter[63:0] is from IEP0 during 64-bit mode IEP1 counter[31:0] is from IEP0 during 32-bit mode. More... | |
int32_t | PRUICSS_PWM_enableIEPResetOnEPWM0SyncOut (PRUICSS_PWM_Handle handle, uint8_t iepInstance, uint8_t enable) |
This API sets enables/disables of IEP counter reset on EPWM0 SYNC OUT event in IEP module. More... | |
int32_t | PRUICSS_PWM_enableIEPResetOnEPWM3SyncOut (PRUICSS_PWM_Handle handle, uint8_t iepInstance, uint8_t enable) |
This API sets enables/disables of IEP counter reset on EPWM3 SYNCOUT in IEP module. More... | |
int32_t | PRUICSS_PWM_attrsInit (PRUICSS_PWM_Handle handle) |
This function Intializes pwm attributes to default values & disables all pwm signals. More... | |
int32_t | PRUICSS_PWM_stateInit (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint8_t instance, uint8_t outputCfgInitialState, uint8_t outputCfgActiveState, uint8_t outputCfgTripState) |
This function Intializes the pwm output configuration of pwm states from the parameters specified. More... | |
int32_t | PRUICSS_PWM_signalEnable (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint8_t instance) |
This function Enables the specified pwm signal. More... | |
int32_t | PRUICSS_PWM_config (PRUICSS_PWM_Handle handle, uint8_t pwmSet, uint8_t instance, uint32_t dutyCycle, uint32_t riseEdgeDelay, uint32_t fallEdgeDelay) |
If pwm signal is enabled, This function Configures or Updates pwm period & duty cycle in PRUICSS_PWM_Handle. More... | |
int32_t | PRUICSS_PWM_stateConfig (PRUICSS_PWM_Handle handle) |
If pwm signal is enabled, This function Configures output state defined in PRUICSS_PWM_Handle. More... | |
int32_t | PRUICSS_PWM_changePwmSetToIntialState (PRUICSS_PWM_Handle handle, uint8_t pwmSetMask) |
This function Changes pwmSet signals to intial state if pwmSet is enabled in pwmSetMask. More... | |
int32_t | PRUICSS_PWM_pruIcssPwmFrequencyInit (PRUICSS_PWM_Handle handle, uint32_t pruIcssPwmFrequency) |
This function Intializes or updates pwm frequency to specified value in PRUICSS_PWM_Handle. More... | |
int32_t | PRUICSS_PWM_iepConfig (PRUICSS_PWM_Handle handle) |
If pwm signal is enabled, This function Configures the Iep parameters defined in PRUICSS_PWM_Handle. More... | |
Typedefs | |
typedef struct PRUICSS_PWM_Config_s * | PRUICSS_PWM_Handle |
A handle that is returned from a PRUICSS_PWM_open() call. This handle is required for calling other PRUICSS PWM APIs. More... | |
Macros | |
#define | PRUICSS_PWM_H_ |
#define | PRUICSS_IEP_COUNT_REG_MAX (0xFFFFFFFFU) |
PRUICSS IEP count register maximum value. More... | |
#define | PRUICSS_IEP_CMP_EVENTS_ENABLE_MAX_VALUE (0x0000FFFFU) |
Number of PRUICSS IEP compare events enable field maximum value. More... | |
#define | PRUICSS_PWM_DEBOUNCE_MAX_VALUE (0xFFU) |
PRUICSS PWM Debounce maximum value. More... | |
#define | PRUICSS_PWM_TRIP_MASK_MAX_VALUE (0x000001FFU) |
PRUICSS PWM mask field maximum value. More... | |
PRUICSS PWM SET | |
#define | PRUICSS_NUM_PWM_SETS (0x4U) |
#define | PRUICSS_PWM_SET0 (0x0U) |
#define | PRUICSS_PWM_SET1 (0x1U) |
#define | PRUICSS_PWM_SET2 (0x2U) |
#define | PRUICSS_PWM_SET3 (0x3U) |
PRUICSS PWM SET INSTANCE | |
#define | PRUICSS_NUM_OF_PWMINSTANCES_PER_PWM_SET (0x6U) |
#define | PRUICSS_PWM_SET_INSTANCE_A0 (0x0U) |
#define | PRUICSS_PWM_SET_INSTANCE_B0 (0x1U) |
#define | PRUICSS_PWM_SET_INSTANCE_A1 (0x2U) |
#define | PRUICSS_PWM_SET_INSTANCE_B1 (0x3U) |
#define | PRUICSS_PWM_SET_INSTANCE_A2 (0x4U) |
#define | PRUICSS_PWM_SET_INSTANCE_B2 (0x5U) |
PRUICSS PWM STATE | |
#define | PRUICSS_NUM_PWM_STATES (0x3U) |
#define | PRUICSS_PWM_INTIAL_STATE (0x0U) |
#define | PRUICSS_PWM_ACTIVE_STATE (0x1U) |
#define | PRUICSS_PWM_TRIP_STATE (0x2U) |
PRUICSS PWM OUTPUT ACTION | |
#define | PRUICSS_NUM_PWM_OUTPUT_ACTIONS (0x3U) |
#define | PRUICSS_PWM_OUTPUT_TOGGLE (0x0U) |
#define | PRUICSS_PWM_OUTPUT_LOW (0x1U) |
#define | PRUICSS_PWM_OUTPUT_HIGH (0x2U) |
PRUICSS IEP INSTANCE | |
#define | PRUICSS_NUM_IEP_INSTANCES (0x2U) |
#define | PRUICSS_IEP_INST0 (0x0U) |
#define | PRUICSS_IEP_INST1 (0x1U) |
PRUICSS IEP COMPARE EVENT | |
#define | PRUICSS_NUM_IEP_CMP_EVENTS (0x10U) |
#define | CMP_EVENT0 (0x0U) |
#define | CMP_EVENT1 (0x1U) |
#define | CMP_EVENT2 (0x2U) |
#define | CMP_EVENT3 (0x3U) |
#define | CMP_EVENT4 (0x4U) |
#define | CMP_EVENT5 (0x5U) |
#define | CMP_EVENT6 (0x6U) |
#define | CMP_EVENT7 (0x7U) |
#define | CMP_EVENT8 (0x8U) |
#define | CMP_EVENT9 (0x9U) |
#define | CMP_EVENT10 (0xAU) |
#define | CMP_EVENT11 (0xBU) |
#define | CMP_EVENT12 (0xCU) |
#define | CMP_EVENT13 (0xDU) |
#define | CMP_EVENT14 (0xEU) |
#define | CMP_EVENT15 (0xFU) |
#define PRUICSS_PWM_H_ |
#define PRUICSS_NUM_PWM_SETS (0x4U) |
#define PRUICSS_PWM_SET0 (0x0U) |
#define PRUICSS_PWM_SET1 (0x1U) |
#define PRUICSS_PWM_SET2 (0x2U) |
#define PRUICSS_PWM_SET3 (0x3U) |
#define PRUICSS_NUM_OF_PWMINSTANCES_PER_PWM_SET (0x6U) |
#define PRUICSS_PWM_SET_INSTANCE_A0 (0x0U) |
#define PRUICSS_PWM_SET_INSTANCE_B0 (0x1U) |
#define PRUICSS_PWM_SET_INSTANCE_A1 (0x2U) |
#define PRUICSS_PWM_SET_INSTANCE_B1 (0x3U) |
#define PRUICSS_PWM_SET_INSTANCE_A2 (0x4U) |
#define PRUICSS_PWM_SET_INSTANCE_B2 (0x5U) |
#define PRUICSS_NUM_PWM_STATES (0x3U) |
#define PRUICSS_PWM_INTIAL_STATE (0x0U) |
#define PRUICSS_PWM_ACTIVE_STATE (0x1U) |
#define PRUICSS_PWM_TRIP_STATE (0x2U) |
#define PRUICSS_NUM_PWM_OUTPUT_ACTIONS (0x3U) |
#define PRUICSS_PWM_OUTPUT_TOGGLE (0x0U) |
#define PRUICSS_PWM_OUTPUT_LOW (0x1U) |
#define PRUICSS_PWM_OUTPUT_HIGH (0x2U) |
#define PRUICSS_NUM_IEP_INSTANCES (0x2U) |
#define PRUICSS_IEP_INST0 (0x0U) |
#define PRUICSS_IEP_INST1 (0x1U) |
#define PRUICSS_IEP_COUNT_REG_MAX (0xFFFFFFFFU) |
PRUICSS IEP count register maximum value.
#define PRUICSS_NUM_IEP_CMP_EVENTS (0x10U) |
#define CMP_EVENT0 (0x0U) |
#define CMP_EVENT1 (0x1U) |
#define CMP_EVENT2 (0x2U) |
#define CMP_EVENT3 (0x3U) |
#define CMP_EVENT4 (0x4U) |
#define CMP_EVENT5 (0x5U) |
#define CMP_EVENT6 (0x6U) |
#define CMP_EVENT7 (0x7U) |
#define CMP_EVENT8 (0x8U) |
#define CMP_EVENT9 (0x9U) |
#define CMP_EVENT10 (0xAU) |
#define CMP_EVENT11 (0xBU) |
#define CMP_EVENT12 (0xCU) |
#define CMP_EVENT13 (0xDU) |
#define CMP_EVENT14 (0xEU) |
#define CMP_EVENT15 (0xFU) |
#define PRUICSS_IEP_CMP_EVENTS_ENABLE_MAX_VALUE (0x0000FFFFU) |
Number of PRUICSS IEP compare events enable field maximum value.
#define PRUICSS_PWM_DEBOUNCE_MAX_VALUE (0xFFU) |
PRUICSS PWM Debounce maximum value.
#define PRUICSS_PWM_TRIP_MASK_MAX_VALUE (0x000001FFU) |
PRUICSS PWM mask field maximum value.
typedef struct PRUICSS_PWM_Config_s* PRUICSS_PWM_Handle |
A handle that is returned from a PRUICSS_PWM_open() call. This handle is required for calling other PRUICSS PWM APIs.
PRUICSS_PWM_Handle PRUICSS_PWM_open | ( | uint32_t | index, |
PRUICSS_Handle | pruIcssHandle | ||
) |
This function returns the handle for a PRUICSS PWM instance.
index | Index of config to use in the gPruIcssPwmConfig array |
pruIcssHandle | PRUICSS_Handle returned from PRUICSS_open() |
int32_t PRUICSS_PWM_setIepCounterLower_32bitValue | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | iepInstance, | ||
uint32_t | value | ||
) |
This API writes Lower_32bit Value of IEP counter in IEP module.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
iepInstance | 0 for IEP0, 1 for IEP1 |
value | IEP count register lower 32bit value |
int32_t PRUICSS_PWM_setIepCounterUpper_32bitValue | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | iepInstance, | ||
uint32_t | value | ||
) |
This API writes Upper_32bit Value of IEP counter in IEP module.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
iepInstance | 0 for IEP0, 1 for IEP1 |
value | IEP count register upper 32bit value |
int32_t PRUICSS_PWM_configureIepShadowModeEnable | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | iepInstance, | ||
uint8_t | enable | ||
) |
This API sets enables/disables of IEP shadow mode.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
iepInstance | 0 for IEP0, 1 for IEP1 |
enable | 0 for disable, 1 for enable |
int32_t PRUICSS_PWM_configureIepCmp0ResetEnable | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | iepInstance, | ||
uint8_t | enable | ||
) |
This API sets enables/disables of IEP counter reset on compare 0 event in IEP module.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
iepInstance | 0 for IEP0, 1 for IEP1 |
enable | 0 for disable, 1 for enable |
int32_t PRUICSS_PWM_configureIepCompareEnable | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | iepInstance, | ||
uint16_t | value | ||
) |
This API sets enables/disables compare events in IEP module.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
iepInstance | 0 for IEP0, 1 for IEP1 |
value | Value to store in compare enable field of compare config register |
int32_t PRUICSS_PWM_setIepCompareEventLower_32bitValue | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | iepInstance, | ||
uint8_t | cmpEvent, | ||
uint32_t | value | ||
) |
This API writes Lower_32bit Value of compare event in IEP module.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
iepInstance | 0 for IEP0, 1 for IEP1 |
value | Compare register lower 32bit value |
cmpEvent | Compare event number. maximum value allowed is 15 |
int32_t PRUICSS_PWM_setIepCompareEventUpper_32bitValue | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | iepInstance, | ||
uint8_t | cmpEvent, | ||
uint32_t | value | ||
) |
This API writes Upper_32bit Value of compare event in IEP module.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
iepInstance | 0 for IEP0, 1 for IEP1 |
value | Compare register upper 32bit Value |
cmpEvent | Compare event number. maximum value allowed is 15 |
int32_t PRUICSS_PWM_setPwmDebounceValue | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint8_t | value | ||
) |
This API updates Debounce Value for specified pwm set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
value | Pwmset debounce value |
int32_t PRUICSS_PWM_setPwmTripMask | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint16_t | maskValue | ||
) |
This API updates TripMask Value for specified pwm set.
Software TripMask
0x0: PWM0_POS_ERR_TRIP (trip_e5)
0x1: PWM0_OVER_ERR_TRIP (trip_e4)
0x2: PWM0_0_SD_SHORT_ERR_TRIP (trip_e3_0)
0x3: PWM0_1_SD_SHORT_ERR_TRIP (trip_e3_1)
0x4: PWM0_2_SD_SHORT_ERR_TRIP (trip_e3_2)
0x5: PWM0_DEBOUNCE_TRIP_IN (trip_e2)
0x6: PWM0_0_DEBOUNCE_TRIP (trip_e1_0)
0x7: PWM0_1_DEBOUNCE_TRIP (trip_e1_1)
0x8: PWM0_2_DEBOUNCE_TRIP (trip_e1_2)
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
maskValue | Pwmset maskValue |
int32_t PRUICSS_PWM_getPwmTripMask | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint16_t * | maskValuePtr | ||
) |
Get trip mask Value for specified pwm set.
Software TripMask
0x0: PWM0_POS_ERR_TRIP (trip_e5)
0x1: PWM0_OVER_ERR_TRIP (trip_e4)
0x2: PWM0_0_SD_SHORT_ERR_TRIP (trip_e3_0)
0x3: PWM0_1_SD_SHORT_ERR_TRIP (trip_e3_1)
0x4: PWM0_2_SD_SHORT_ERR_TRIP (trip_e3_2)
0x5: PWM0_DEBOUNCE_TRIP_IN (trip_e2)
0x6: PWM0_0_DEBOUNCE_TRIP (trip_e1_0)
0x7: PWM0_1_DEBOUNCE_TRIP (trip_e1_1)
0x8: PWM0_2_DEBOUNCE_TRIP (trip_e1_2)
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
maskValuePtr | [out] Pwmset maskValue |
int32_t PRUICSS_PWM_configurePwmCmp0TripResetEnable | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint8_t | enable | ||
) |
This API enables/disables TripReset on Compare_0 Event for specified pwm set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
enable | 0 for disable, 1 for enable |
int32_t PRUICSS_PWM_generatePwmTripReset | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet | ||
) |
This API generates Software Trip Reset by writing 1 to bit field for specified pwm set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
int32_t PRUICSS_PWM_generatePwmOverCurrentErrorTrip | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet | ||
) |
This API generates Software Over current error trip by writing 1 to bit field for specified pwm set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
int32_t PRUICSS_PWM_generatePwmPositionFeedbackErrorTrip | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet | ||
) |
This API generates Software Position Feedback Error Trip by writing 1 to bit field for specified pwm set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
int32_t PRUICSS_PWM_clearPwmTripResetStatus | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet | ||
) |
This API clears Software Trip Reset by writing 0 to bit field for specified pwm set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
int32_t PRUICSS_PWM_clearPwmOverCurrentErrorTrip | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet | ||
) |
This API clears Software Over current error trip by writing 0 to bit field for specified pwm set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
int32_t PRUICSS_PWM_clearPwmPositionFeedbackErrorTrip | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet | ||
) |
This API clears Software Position Feedback Error Trip by writing 0 to bit field for specified pwm set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
int32_t PRUICSS_PWM_getPwmTripTriggerCauseVector | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet | ||
) |
This API returns Trip trigger cause vector for specified pwm set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
int32_t PRUICSS_PWM_getPwmTripStatus | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet | ||
) |
This API returns Trip status for specified pwm set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
int32_t PRUICSS_PWM_clearPwmTripStatus | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet | ||
) |
This API clears Trip status and makes state transition to Intial state as follows (Active->Intial) or (Trip->Intial) for specified pwm set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
int32_t PRUICSS_PWM_actionOnOutputCfgPwmSignalA0 | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint8_t | state, | ||
uint8_t | action | ||
) |
This API updates output action for specified state of A0 signal for specified PWM set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
state | 0 for Intial, 1 for Active, 2 for Safe(alias Trip) state |
action | 0 for Toggle, 1 for Low, 2 for High |
int32_t PRUICSS_PWM_actionOnOutputCfgPwmSignalA1 | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint8_t | state, | ||
uint8_t | action | ||
) |
This API updates output action for specified state of A1 signal for specified PWM set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
state | 0 for Intial, 1 for Active, 2 for Safe(alias Trip) state |
action | 0 for Toggle, 1 for Low, 2 for High |
int32_t PRUICSS_PWM_actionOnOutputCfgPwmSignalA2 | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint8_t | state, | ||
uint8_t | action | ||
) |
This API updates output action for specified state of A2 signal for specified PWM set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
state | 0 for Intial, 1 for Active, 2 for Safe(alias Trip) state |
action | 0 for Toggle, 1 for Low, 2 for High |
int32_t PRUICSS_PWM_actionOnOutputCfgPwmSignalB0 | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint8_t | state, | ||
uint8_t | action | ||
) |
This API updates output action for specified state of B0 signal for specified PWM set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
state | 0 for Intial, 1 for Active, 2 for Safe(alias Trip) state |
action | 0 for Toggle, 1 for Low, 2 for High |
int32_t PRUICSS_PWM_actionOnOutputCfgPwmSignalB1 | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint8_t | state, | ||
uint8_t | action | ||
) |
This API updates output action for specified state of B1 signal for specified PWM set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
state | 0 for Intial, 1 for Active, 2 for Safe(alias Trip) state |
action | 0 for Toggle, 1 for Low, 2 for High |
int32_t PRUICSS_PWM_actionOnOutputCfgPwmSignalB2 | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint8_t | state, | ||
uint8_t | action | ||
) |
This API updates output action for specified state of B2 signal for specified PWM set.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | 0 for PWM0, 1 for PWM1, 2 for PWM2, 3 for PWM3 |
state | 0 for Intial, 1 for Active, 2 for Safe(alias Trip) state |
action | 0 for Toggle, 1 for Low, 2 for High |
int32_t PRUICSS_PWM_configurePwmEfficiencyModeEnable | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | enable | ||
) |
This API enables Efficiency mode In Efficiency mode Pwm state machine will go from Idle to Active and the same time Pwm output will get updated during this state transition And IEP Cmp flags will get auto HW cleared.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
enable | 0 for disable, 1 for enable |
int32_t PRUICSS_PWM_enableIEP1Slave | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | enable | ||
) |
This function enables IEP1 counter follow IEP0 counter when Enabled IEP1 counter acts as slave IEP1 counter[63:0] is from IEP0 during 64-bit mode IEP1 counter[31:0] is from IEP0 during 32-bit mode.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
enable | 0 for disable, 1 for enable |
int32_t PRUICSS_PWM_enableIEPResetOnEPWM0SyncOut | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | iepInstance, | ||
uint8_t | enable | ||
) |
This API sets enables/disables of IEP counter reset on EPWM0 SYNC OUT event in IEP module.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
iepInstance | 0 for IEP0, 1 for IEP1 |
enable | 0 for disable, 1 for enable |
int32_t PRUICSS_PWM_enableIEPResetOnEPWM3SyncOut | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | iepInstance, | ||
uint8_t | enable | ||
) |
This API sets enables/disables of IEP counter reset on EPWM3 SYNCOUT in IEP module.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
iepInstance | 0 for IEP0, 1 for IEP1 |
enable | 0 for disable, 1 for enable |
int32_t PRUICSS_PWM_attrsInit | ( | PRUICSS_PWM_Handle | handle | ) |
This function Intializes pwm attributes to default values & disables all pwm signals.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
int32_t PRUICSS_PWM_stateInit | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint8_t | instance, | ||
uint8_t | outputCfgInitialState, | ||
uint8_t | outputCfgActiveState, | ||
uint8_t | outputCfgTripState | ||
) |
This function Intializes the pwm output configuration of pwm states from the parameters specified.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | pwm set number from PRUICSS_PWM_SET |
instance | pwm set instance number from PRUICSS_PWM_SET_INSTANCE |
outputCfgInitialState | pwm set instance output config in intial state PRUICSS_PWM_OUTPUT_ACTION |
outputCfgActiveState | pwm set instance output config in active state PRUICSS_PWM_OUTPUT_ACTION |
outputCfgTripState | pwm set instance output config in trip state PRUICSS_PWM_OUTPUT_ACTION |
int32_t PRUICSS_PWM_signalEnable | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint8_t | instance | ||
) |
This function Enables the specified pwm signal.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | pwm set number from PRUICSS_PWM_SET |
instance | pwm set instance number from PRUICSS_PWM_SET_INSTANCE |
int32_t PRUICSS_PWM_config | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSet, | ||
uint8_t | instance, | ||
uint32_t | dutyCycle, | ||
uint32_t | riseEdgeDelay, | ||
uint32_t | fallEdgeDelay | ||
) |
If pwm signal is enabled, This function Configures or Updates pwm period & duty cycle in PRUICSS_PWM_Handle.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSet | pwm set number from PRUICSS_PWM_SET |
instance | pwm set instance number from PRUICSS_PWM_SET_INSTANCE |
dutyCycle | pwm set instance dutycycle to be configured |
riseEdgeDelay | pwm set instance riseEdgeDelay to be configured |
fallEdgeDelay | pwm set instance fallEdgeDelay to be configured |
int32_t PRUICSS_PWM_stateConfig | ( | PRUICSS_PWM_Handle | handle | ) |
If pwm signal is enabled, This function Configures output state defined in PRUICSS_PWM_Handle.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
int32_t PRUICSS_PWM_changePwmSetToIntialState | ( | PRUICSS_PWM_Handle | handle, |
uint8_t | pwmSetMask | ||
) |
This function Changes pwmSet signals to intial state if pwmSet is enabled in pwmSetMask.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pwmSetMask | pwmSet enabled mask PRUICSS_PWM_SET to find bit id mapped to pwm set number |
int32_t PRUICSS_PWM_pruIcssPwmFrequencyInit | ( | PRUICSS_PWM_Handle | handle, |
uint32_t | pruIcssPwmFrequency | ||
) |
This function Intializes or updates pwm frequency to specified value in PRUICSS_PWM_Handle.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |
pruIcssPwmFrequency | pruIcssPwmFrequency to be configured |
int32_t PRUICSS_PWM_iepConfig | ( | PRUICSS_PWM_Handle | handle | ) |
If pwm signal is enabled, This function Configures the Iep parameters defined in PRUICSS_PWM_Handle.
handle | PRUICSS_PWM_Handle returned from PRUICSS_PWM_open() |