AM64x MCU+ SDK  08.06.00

Introduction

Here is the list of APIs used for Sigma Delta interface

Functions

sdfm_handle SDFM_init (uint8_t pru_id)
 Initialize SDFM instance. More...
 
void SDFM_configIepCount (sdfm_handle h_sdfm, uint32_t epwm_out_freq)
 Configure iep increment & iep count in one epwm cycle. More...
 
void SDFM_configEcap (sdfm_handle h_sdfm, uint8_t ecap_divider)
 Configure ecap parameters for generate 20MHz SD clock. More...
 
void SDFM_setEnableChannel (sdfm_handle h_sdfm, uint8_t channel_number)
 Enable the channel specified by the channel number parameter. More...
 
void SDFM_setAccOverSamplingRatio (sdfm_handle h_sdfm, uint8_t ch_id, uint8_t osr)
 Configure Accumulator over sampling ratio. More...
 
void SDFM_enable (sdfm_handle h_sdfm)
 SDFM global enable. More...
 
void SDFM_setCompFilterThresholds (sdfm_handle h_sdfm, uint8_t ch_id, SDFM_ThresholdParms thresholdParms)
 configuration of SDFM threshold values More...
 
void SDFM_setSampleReadingTime (sdfm_handle h_sdfm, float trig_samp_time)
 configuration of sample read time one Epwm cycle More...
 
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 support only SYNC3 filter
More...
 
void SDFM_selectClockSource (sdfm_handle h_sdfm, uint8_t ch_id, SDFM_ClkSourceParms clkPrams)
 configuration of SDFM channel clock source & clock inversion More...
 
void SDFM_enableComparator (sdfm_handle h_sdfm, uint8_t ch)
 This API enables the Comparator for the selected channel. More...
 
void SDFM_disableComparator (sdfm_handle h_sdfm, uint8_t ch)
 This API disables the Comparator for the selected channel. More...
 
void SDFM_configComparatorGpioPins (sdfm_handle h_sdfm, uint8_t ch, uint32_t gpio_base_addr, uint32_t pin_number, uint32_t threshold_type)
 configure GPIO pin number and address for associate Channel Number More...
 
uint32_t SDFM_getFilterData (uint8_t ch)
 get sample data from DMEM More...
 
void SDFM_setCompFilterOverSamplingRatio (sdfm_handle h_sdfm, uint16_t osr)
 Configure iep count for over current sampling. More...
 
void SDFM_setFilterOverSamplingRatio (sdfm_handle h_sdfm, uint16_t nc_osr, uint16_t oc_osr)
 Configure iep count for normal current sampling. More...
 

Typedefs

typedef SDFMsdfm_handle
 

Macros

#define NUM_PRU   ( 2 )
 
#define PRU_ID_0   ( 0 ) /* PRU 0 ID */
 
#define PRU_ID_1   ( 1 ) /* PRU 1 ID */
 
#define NUM_SD_CH   ( ICSSG_NUM_SD_CH )
 
#define SDFM_EVT   ( TRIGGER_HOST_SDFM_EVT )
 

Macro Definition Documentation

◆ NUM_PRU

#define NUM_PRU   ( 2 )

◆ PRU_ID_0

#define PRU_ID_0   ( 0 ) /* PRU 0 ID */

◆ PRU_ID_1

#define PRU_ID_1   ( 1 ) /* PRU 1 ID */

◆ NUM_SD_CH

#define NUM_SD_CH   ( ICSSG_NUM_SD_CH )

◆ SDFM_EVT

#define SDFM_EVT   ( TRIGGER_HOST_SDFM_EVT )

Typedef Documentation

◆ sdfm_handle

typedef SDFM* sdfm_handle

Function Documentation

◆ SDFM_init()

sdfm_handle SDFM_init ( uint8_t  pru_id)

Initialize SDFM instance.

Parameters
[in]pru_idPRU (SD) ID
Return values
sdfmSDFM instance handle

◆ SDFM_configIepCount()

void SDFM_configIepCount ( sdfm_handle  h_sdfm,
uint32_t  epwm_out_freq 
)

Configure iep increment & iep count in one epwm cycle.

Parameters
[in]h_sdfmSDFM handle
[in]epwm_out_freqepwm output frequency

◆ SDFM_configEcap()

void SDFM_configEcap ( sdfm_handle  h_sdfm,
uint8_t  ecap_divider 
)

Configure ecap parameters for generate 20MHz SD clock.

Parameters
[in]h_sdfmSDFM handle
[in]ecap_dividerecap divider for sdfm clock

◆ SDFM_setEnableChannel()

void SDFM_setEnableChannel ( sdfm_handle  h_sdfm,
uint8_t  channel_number 
)

Enable the channel specified by the channel number parameter.

Parameters
[in]h_sdfmSDFM handle
[in]channel_numberchannel number

◆ SDFM_setAccOverSamplingRatio()

void SDFM_setAccOverSamplingRatio ( sdfm_handle  h_sdfm,
uint8_t  ch_id,
uint8_t  osr 
)

Configure Accumulator over sampling ratio.

Parameters
[in]h_sdfmSDFM handle
[in]ch_idcurrent ch number
[in]osrover sampling ratio

◆ SDFM_enable()

void SDFM_enable ( sdfm_handle  h_sdfm)

SDFM global enable.

Parameters
[in]h_sdfmSDFM handle

◆ SDFM_setCompFilterThresholds()

void SDFM_setCompFilterThresholds ( sdfm_handle  h_sdfm,
uint8_t  ch_id,
SDFM_ThresholdParms  thresholdParms 
)

configuration of SDFM threshold values

Parameters
[in]h_sdfmSDFM handle
[in]ch_idcurrent ch number
[in]thresholdParmsthresholds parametrs (High and Low )

◆ SDFM_setSampleReadingTime()

void SDFM_setSampleReadingTime ( sdfm_handle  h_sdfm,
float  trig_samp_time 
)

configuration of sample read time one Epwm cycle

Parameters
[in]h_sdfmSDFM handle
[in]trig_samp_timesample read time in one pwm cycle

◆ SDFM_configDataFilter()

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 support only SYNC3 filter

Parameters
[in]h_sdfmSDFM handle
[in]ch_idcurrent ch number
[in]filterfilter type (acc source)

◆ SDFM_selectClockSource()

void SDFM_selectClockSource ( sdfm_handle  h_sdfm,
uint8_t  ch_id,
SDFM_ClkSourceParms  clkPrams 
)

configuration of SDFM channel clock source & clock inversion

Parameters
[in]h_sdfmSDFM handle
[in]ch_idcurrent ch number
[in]clkPramschannel clock source type & clock inversion

◆ SDFM_enableComparator()

void SDFM_enableComparator ( sdfm_handle  h_sdfm,
uint8_t  ch 
)

This API enables the Comparator for the selected channel.

Parameters
[in]h_sdfmSDFM handle
[in]chcurrent ch number

◆ SDFM_disableComparator()

void SDFM_disableComparator ( sdfm_handle  h_sdfm,
uint8_t  ch 
)

This API disables the Comparator for the selected channel.

Parameters
[in]h_sdfmSDFM handle
[in]chcurrent ch number

◆ SDFM_configComparatorGpioPins()

void SDFM_configComparatorGpioPins ( sdfm_handle  h_sdfm,
uint8_t  ch,
uint32_t  gpio_base_addr,
uint32_t  pin_number,
uint32_t  threshold_type 
)

configure GPIO pin number and address for associate Channel Number

Parameters
[in]h_sdfmSDFM handle
[in]chcurrent ch number
[in]gpio_base_addrGPIO bas address
[in]pin_numberGPIO PIN number
[in]threshold_typeThreshold type: High(0), Low(1)

◆ SDFM_getFilterData()

uint32_t SDFM_getFilterData ( uint8_t  ch)

get sample data from DMEM

Parameters
[in]chcurrent ch number
Return values
currentsample value

◆ SDFM_setCompFilterOverSamplingRatio()

void SDFM_setCompFilterOverSamplingRatio ( sdfm_handle  h_sdfm,
uint16_t  osr 
)

Configure iep count for over current sampling.

Parameters
[in]h_sdfmSDFM handle
[in]osrover current osr value

◆ SDFM_setFilterOverSamplingRatio()

void SDFM_setFilterOverSamplingRatio ( sdfm_handle  h_sdfm,
uint16_t  nc_osr,
uint16_t  oc_osr 
)

Configure iep count for normal current sampling.

Parameters
[in]h_sdfmSDFM handle
[in]nc_osrnormal current osr value
[in]oc_osrover current osr value