PEController BSP v4
Board Support Package for PEController from Taraz Technologies
 
Loading...
Searching...
No Matches
Functions

Functions

DutyCycleUpdateFnc BSP_PWM11_16_ConfigInvertedPairs (uint32_t pwmNo, pwm_config_t *config, int pairCount)
 Configures consecutive inverted pairs for PWM.
 
float BSP_PWM11_16_UpdatePairDuty (uint32_t pwmNo, float duty, pwm_config_t *config)
 Update the Duty Cycle of an Inverted Pair.
 
DutyCycleUpdateFnc BSP_PWM11_16_ConfigChannels (uint32_t pwmNo, pwm_config_t *config, int chCount)
 Configures consecutive PWM channels.
 
float BSP_PWM11_16_UpdateChannelDuty (uint32_t pwmNo, float duty, pwm_config_t *config)
 Update the Duty Cycle of a channel.
 
void BSP_PWM11_16_Config_Interrupt (bool enable, PWMResetCallback callback, int priority)
 Enable / Disable interrupt for a PWM channel as per requirement.
 

Detailed Description

Function Documentation

◆ BSP_PWM11_16_Config_Interrupt()

void BSP_PWM11_16_Config_Interrupt ( bool  enable,
PWMResetCallback  callback,
int  priority 
)
extern
Parameters
enableIf enable interrupt set this parameter to true
callbackSpecifies the function to be called when the PWM is reset
priorityInterrupt priority. Range (0-15). Here 0 is the highest priority

◆ BSP_PWM11_16_ConfigChannels()

DutyCycleUpdateFnc BSP_PWM11_16_ConfigChannels ( uint32_t  pwmNo,
pwm_config_t config,
int  chCount 
)
extern
Parameters
pwmNoChannel no of the first PWM Channel in the pair (Valid Values 11-16)
*configPointer to a pwm_config_t structure that contains the configuration parameters for the PWM channels
chCountNo of channels to be configured with the setting. Max supported value is 3. The value should be counted while skipping even channels. e.g. if pwmNo = 11 and chCount = 2 the PWMs 11 and 13 will be configured with the specified setting while PWM12 will be the inverted version of PWM11
Returns
DutyCycleUpdateFnc Returns the function pointer of the type DutyCycleUpdateFnc which needs to be called whenever the duty cycles of the pair need to be updated

◆ BSP_PWM11_16_ConfigInvertedPairs()

DutyCycleUpdateFnc BSP_PWM11_16_ConfigInvertedPairs ( uint32_t  pwmNo,
pwm_config_t config,
int  pairCount 
)
extern
Parameters
pwmNoChannel no of reference channel is the PWM pair (Valid Values 11-16).
Pairs are classified as :
  1. CH1 = Reference channel available at pin pwmNo
  2. CH2 = Inverted Channel from reference available at pin pwmNo + 1 if pwmNo is odd else pwmNo - 1
*configPointer to a pwm_config_t structure that contains the configuration parameters for the PWM pair
pairCountNo of PWM pairs to be configured
Returns
DutyCycleUpdateFnc Returns the function pointer of the type DutyCycleUpdateFnc which needs to be called whenever the duty cycles of the pair need to be updated

◆ BSP_PWM11_16_UpdateChannelDuty()

float BSP_PWM11_16_UpdateChannelDuty ( uint32_t  pwmNo,
float  duty,
pwm_config_t config 
)
extern
Parameters
pwmNoPWM channel to be configured (Valid Values 11-16)
dutyduty cycle to be applied to the channel (Range 0-1 or given in the config parameter)
*configPointer to a pwm_config_t structure that contains the configuration parameters for the PWM channel
Returns
float Duty cycle applied in this cycle. May differ from the duty variable if outside permitted limits

◆ BSP_PWM11_16_UpdatePairDuty()

float BSP_PWM11_16_UpdatePairDuty ( uint32_t  pwmNo,
float  duty,
pwm_config_t config 
)
extern
Parameters
pwmNoChannel no of reference channel is the PWM pair (Valid Values 11-16).
Pairs are classified as :
  1. CH1 = Reference channel available at pin pwmNo
  2. CH2 = Inverted Channel from reference available at pin pwmNo + 1 if pwmNo is odd else pwmNo - 1
dutyduty cycle to be applied to the pair (Range 0-1 or given in the config parameter)
*configPointer to a pwm_config_t structure that contains the configuration parameters for the PWM pair
Returns
float Duty cycle applied in this cycle. May differ from the duty variable if outside permitted limits