![Logo](ti_logo.svg) |
AM243x Motor Control SDK
09.02.00
|
|
Go to the documentation of this file.
42 #include "../firmware/icssg_sdfm.h"
44 #include <drivers/pruicss.h>
67 #define PRU_ID_0 ( 0 )
68 #define PRU_ID_1 ( 1 )
70 #define PRUx_DMEM_BASE_ADD (0x00)
71 #define RTUx_DMEM_BASE_ADD (0x200)
72 #define TXPRUx_DMEM_BASE_ADD (0x400)
74 #define NUM_SD_CH ( ICSSG_NUM_SD_CH )
76 #define SDFM_EVT ( TRIGGER_HOST_SDFM_EVT )
void SDFM_configFastDetect(sdfm_handle h_sdfm, uint8_t ch, uint8_t *fdParms)
This API Configure Fast detect block fields.
void SDFM_enableDoubleSampling(sdfm_handle h_sdfm, float samp_trig_time)
configuration and enable second normal current sample starting time one Epwm cycle
void SDFM_disableZeroCrossDetection(sdfm_handle h_sdfm, uint8_t chNum)
This API disbales zero cross detection for specified SDFM channel number.
void SDFM_setCompFilterThresholds(sdfm_handle h_sdfm, uint8_t ch_id, uint32_t *thresholdParms)
configuration of SDFM threshold values
void SDFM_configComparatorGpioPins(sdfm_handle h_sdfm, uint8_t ch, uint32_t gpio_base_addr, uint32_t pin_number)
configure GPIO pin number and address for associate Channel Number
void SDFM_enableLoadShareMode(sdfm_handle h_sdfm, uint8_t sliceId)
This API enables load share mode.
uint8_t SDFM_getLowThresholdStatus(sdfm_handle h_sdfm, uint8_t chNum)
This API returns Low threshold Status for specified SDFM channel number.
void SDFM_enableContinuousNormalCurrent(sdfm_handle h_sdfm)
This API enables continuous normal current sampling.
int32_t SDFM_getFastDetectErrorStatus(sdfm_handle h_sdfm, uint8_t chNum)
This API returns the fast detect error status for specified SDFM channel number.
void SDFM_enableComparator(sdfm_handle h_sdfm, uint8_t ch)
This API enables the Comparator for the selected channel.
int32_t SDFM_enableEpwmSync(sdfm_handle h_sdfm, uint8_t epwmIns)
This API enables EPWM synchronization with SDFM.
SDFM * sdfm_handle
Definition: sdfm_api.h:79
void SDFM_setFilterOverSamplingRatio(sdfm_handle h_sdfm, uint16_t nc_osr)
Configure iep count for normal current sampling.
void SDFM_configIepCount(sdfm_handle h_sdfm, uint32_t epwm_out_freq)
Configure iep increment & iep count in one epwm cycle.
int32_t SDFM_enableIep(sdfm_handle h_sdfm)
This API enables IEP counter.
uint8_t SDFM_getZeroCrossThresholdStatus(sdfm_handle h_sdfm, uint8_t chNum)
This API returns Zero cross Status for specified SDFM channel number.
uint32_t SDFM_getFilterData(sdfm_handle h_sdfm, uint8_t ch)
get sample data from DMEM
uint32_t SDFM_getFirmwareVersion(sdfm_handle h_sdfm)
Return Firmware version.
void SDFM_enable(sdfm_handle h_sdfm)
SDFM global enable.
void SDFM_measureClockPhaseDelay(sdfm_handle h_sdfm, uint16_t clEdg)
Measure Clock phase compensation.
void SDFM_setCompFilterOverSamplingRatio(sdfm_handle h_sdfm, uint8_t ch_id, uint16_t osr)
Configure comparator filter (over current) sampling ratio.
void SDFM_configEcap(sdfm_handle h_sdfm, uint8_t ecap_divider)
Configure ecap parameters for generate SD clock.
void SDFM_selectClockSource(sdfm_handle h_sdfm, uint8_t ch_id, uint8_t clk_source)
configuration of SDFM channel clock source
void SDFM_configDataFilter(sdfm_handle h_sdfm, uint8_t ch_id, uint8_t filter)
configuration of SDFM channel Acc source (sync filter type). Current SDFM firmware implementation s...
void SDFM_enableZeroCrossDetection(sdfm_handle h_sdfm, uint8_t chNum, uint32_t zcThr)
This API enables zero cross detection for specified SDFM channel number.
int32_t SDFM_disableEpwmSync(sdfm_handle h_sdfm, uint8_t epwmIns)
This API disbale EPWM synchronization with SDFM.
int32_t SDFM_clearPwmTripStatus(sdfm_handle h_sdfm, uint8_t chNum)
Clear PWM trip status of the corresponding PWM trip zone block for specified SDFM channel number.
int32_t SDFM_configIepSyncMode(sdfm_handle h_sdfm, uint32_t highPulseWidth, uint32_t periodTime, uint32_t syncStartTime)
This API configures IEP SYNC0 and SYNC1 registers to generate free running clock.
int32_t SDFM_clearOverCurrentError(sdfm_handle h_sdfm, uint8_t chNum)
This API clears Overcurrent error bit of corresponding PWM register for specified SDFM channel number...
void SDFM_setClockInversion(sdfm_handle h_sdfm, uint8_t ch_id, uint8_t clk_inv)
configuration of SDFM channel clock inversion
int32_t SDFM_configSync1Delay(sdfm_handle h_sdfm, uint32_t delay)
Defines clock cycles from the start of SYNC0 to the start of SYNC1.
float SDFM_getClockPhaseDelay(sdfm_handle h_sdfm)
This API returns Clock phase compensation.
void SDFM_setEnableChannel(sdfm_handle h_sdfm, uint8_t channel_number)
Enable the channel specified by the channel number parameter.
sdfm_handle SDFM_init(PRUICSS_Handle pruIcssHandle, uint8_t pruId, uint8_t coreId)
Initialize SDFM instance.
void SDFM_disableDoubleSampling(sdfm_handle h_sdfm)
Disable double normal current update/sampling.
Structure defining SDFM interface.
Definition: sdfm_drv.h:354
void SDFM_setSampleTriggerTime(sdfm_handle h_sdfm, float samp_trig_time)
configuration of single sample trigger time one Epwm cycle
uint8_t SDFM_getHighThresholdStatus(sdfm_handle h_sdfm, uint8_t chNum)
This API returns high threshold Status for specified SDFM channel number.
void SDFM_disableComparator(sdfm_handle h_sdfm, uint8_t ch)
This API disables the Comparator for the selected channel.
int32_t SDFM_configClockFromGPO1(sdfm_handle h_sdfm, uint8_t div0, uint8_t div1)