AM243x Motor Control SDK  09.01.00
pruicss_pwm.h File Reference

Go to the source code of this file.

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 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)
 

Functions

int32_t PRUICSS_PWM_setIepCounterLower_32bitValue (PRUICSS_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_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_configureIepCmp0ResetEnable (PRUICSS_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_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_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_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_Handle handle, uint8_t pwmSet, uint8_t value)
 This API updates Debounce Value for specified pwm set. More...
 
int32_t PRUICSS_PWM_setPwmTripMask (PRUICSS_Handle handle, uint8_t pwmSet, uint16_t maskvalue)
 This API updates TripMask Value for specified pwm set. More...
 
int32_t PRUICSS_PWM_configurePwmCmp0TripResetEnable (PRUICSS_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_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_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_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_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_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_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_Handle handle, uint8_t pwmSet)
 This API returns Trip trigger cause vector for specified pwm set. More...
 
int32_t PRUICSS_PWM_getPwmTripStatus (PRUICSS_Handle handle, uint8_t pwmSet)
 This API returns Trip status for specified pwm set. More...
 
int32_t PRUICSS_PWM_clearPwmTripStatus (PRUICSS_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_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_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_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_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_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_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_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_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_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_Handle handle, uint8_t iepInstance, uint8_t enable)
 This API sets enables/disables of IEP counter reset on EPWM3 SYNCOUT in IEP module. More...