RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
bbb-pwm.h File Reference

BeagleBone Black PWM support definitions. More...

Go to the source code of this file.

Macros

#define BBB_CONTROL_CONF_GPMC_AD(n)   (0x800 + (n * 4))
 BeagleBone Black PWM Macros.
 
#define BBB_CONTROL_CONF_LCD_DATA(n)   (0x8a0 + (n * 4))
 
#define BBB_P8_13_MUX_PWM   4
 
#define BBB_P8_19_MUX_PWM   4
 
#define BBB_P8_45_MUX_PWM   3
 
#define BBB_P8_46_MUX_PWM   3
 
#define BBB_P8_34_MUX_PWM   2
 
#define BBB_P8_36_MUX_PWM   2
 
#define BBB_P9_14_MUX_PWM   6
 
#define BBB_P9_16_MUX_PWM   6
 
#define BBB_P9_21_MUX_PWM   3
 
#define BBB_P9_22_MUX_PWM   3
 
#define BBB_P9_29_MUX_PWM   1
 
#define BBB_P9_31_MUX_PWM   1
 
#define BBB_PWM_FREQ_THRESHOLD   0.5f
 

Enumerations

enum  bbb_pwm_pin_t {
  BBB_P8_13_2B = 3 , BBB_P8_19_2A , BBB_P8_45_2A , BBB_P8_46_2B ,
  BBB_P8_34_1B , BBB_P8_36_1A , BBB_P9_14_1A , BBB_P9_16_1B ,
  BBB_P9_21_0B , BBB_P9_22_0A , BBB_P9_29_0B , BBB_P9_31_0A
}
 

Functions

bool beagle_pwm_init (BBB_PWMSS pwmss_id)
 BeagleBone Black PWM API.
 
int beagle_pwm_configure (BBB_PWMSS pwm_id, float pwm_freq, float duty_a, float duty_b)
 
bool beagle_pwm_enable (BBB_PWMSS pwmid)
 This API enables the particular PWM module.
 
bool beagle_pwm_disable (BBB_PWMSS pwmid)
 This API disables the particular PWM module.
 
bool beagle_pwm_pinmux_setup (bbb_pwm_pin_t pin_no, BBB_PWMSS pwm_id)
 This function enables pinmuxing for PWM module.
 
bool beagle_pwmss_is_running (unsigned int pwmss_id)
 This function determines whether PWMSS-wide clocks enabled or not.
 

Detailed Description

BeagleBone Black PWM support definitions.

Macro Definition Documentation

◆ BBB_CONTROL_CONF_GPMC_AD

#define BBB_CONTROL_CONF_GPMC_AD (   n)    (0x800 + (n * 4))

BeagleBone Black PWM Macros.

Some constants are taken from https://github.com/VegetableAvenger/BBBIOlib/blob/master/BBBio_lib/BBBiolib_PWMSS.h

Function Documentation

◆ beagle_pwm_disable()

bool beagle_pwm_disable ( BBB_PWMSS  pwmid)

This API disables the particular PWM module.

Parameters
pwmidIt is the instance number of EPWM of pwm sub system.
Returns
true if successful
false if fail

◆ beagle_pwm_enable()

bool beagle_pwm_enable ( BBB_PWMSS  pwmid)

This API enables the particular PWM module.

Parameters
pwmidIt is the instance number of EPWM of pwm sub system.
Returns
true if successful
false if fail

◆ beagle_pwm_init()

bool beagle_pwm_init ( BBB_PWMSS  pwmss_id)

BeagleBone Black PWM API.

This function intilizes clock for pwm sub system.

Parameters
PWMSS_IDIt is the instance number of EPWM of pwm sub system.
Returns
true if successful
false if not successful

◆ beagle_pwm_pinmux_setup()

bool beagle_pwm_pinmux_setup ( bbb_pwm_pin_t  pin_no,
BBB_PWMSS  pwm_id 
)

This function enables pinmuxing for PWM module.

Parameters
pin_noIt is individual pin at which freuqency need to be generated. It should be according to pwm sub system.
pwm_idIt is the instance number of EPWM of pwmsubsystem.
Returns
true if successful
false if fail

◆ beagle_pwmss_is_running()

bool beagle_pwmss_is_running ( unsigned int  pwmss_id)

This function determines whether PWMSS-wide clocks enabled or not.

Parameters
pwmss_idIt is the instance number of PWMSS which clocks need to be checked.
Returns
true if successful
false if fail