brushless3 2.0.0.0
|
Functions | |
void | brushless3_cfg_setup (brushless3_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | brushless3_init (brushless3_t *ctx, brushless3_cfg_t *cfg) |
Initialization function. | |
err_t | brushless3_default_cfg (brushless3_t *ctx) |
Click Default Configuration function. | |
err_t | brushless3_write_data (brushless3_t *ctx, uint8_t reg_addr, uint8_t write_data) |
Write function. | |
err_t | brushless3_read_data (brushless3_t *ctx, uint8_t reg_addr, uint8_t *read_data) |
Read function. | |
err_t | brushless3_set_default_param (brushless3_t *ctx) |
Set default parameter function. | |
err_t | brushless3_set_pwm_mode (brushless3_t *ctx) |
Set PWM mode function. | |
err_t | brushless3_set_an_mode (brushless3_t *ctx) |
Set Analog mode function. | |
err_t | brushless3_dis_sleep_mode (brushless3_t *ctx) |
Disable entering into sleep or standby mode function. | |
err_t | brushless3_en_config (brushless3_t *ctx) |
Enable the writing to the configuration registers function. | |
err_t | brushless3_dis_config (brushless3_t *ctx) |
Disable the writing to the configuration registers function. | |
err_t | brushless3_copy_eeprom (brushless3_t *ctx) |
Copy EEPROM data to register function. | |
err_t | brushless3_en_write_eeprom (brushless3_t *ctx) |
Enable the writing to the EEPROM registers function. | |
err_t | brushless3_dis_write_eeprom (brushless3_t *ctx) |
Disable the writing to the EEPROM registers function. | |
err_t | brushless3_check_over_temp (brushless3_t *ctx, uint8_t *over_temp) |
Check indicate device temperature is over its limits function. | |
err_t | brushless3_check_sleep_mode (brushless3_t *ctx, uint8_t *sleep_mode) |
Check indicate that device went into sleep or standby mode function. | |
err_t | brushless3_check_motor_lock (brushless3_t *ctx, uint8_t *motor_lock) |
Check indicate that the motor is locked function. | |
err_t | brushless3_get_supply_voltage (brushless3_t *ctx, float *voltage) |
Get the supply voltage function. | |
err_t | brushless3_get_speed_cmd (brushless3_t *ctx, float *speed_cmd) |
Get the speed command ( % ) based on analog or PWM or I2C function. | |
err_t | brushless3_check_fault_code (brushless3_t *ctx, uint8_t *fault_code) |
Check fault code function. | |
err_t | brushless3_get_speed (brushless3_t *ctx, float *speed) |
Get speed function. | |
err_t | brushless3_set_speed (brushless3_t *ctx, uint16_t motor_speed_hz) |
Set speed function. | |
err_t | brushless3_set_speed_pwm (brushless3_t *ctx, uint16_t motor_speed_hz) |
Set speed PWM function. | |
err_t | brushless3_get_period (brushless3_t *ctx, float *period) |
Get motor period function. | |
err_t | brushless3_en_prog_eeprom (brushless3_t *ctx) |
Set prog key function. | |
err_t | brushless3_get_vel_const (brushless3_t *ctx, float *velocity) |
Get measured velocity constant function. | |
void | brushless3_forward_direction (brushless3_t *ctx) |
Set the direction of rotation in the forward direction function. | |
void | brushless3_reverse_direction (brushless3_t *ctx) |
Set the direction of rotation in the reverse direction function. | |
uint8_t | brushless3_get_int_pin (brushless3_t *ctx) |
Get Interrupt pin state function. | |
err_t | brushless3_set_duty_cycle (brushless3_t *ctx, float duty_cycle) |
Generic sets PWM duty cycle. | |
err_t | brushless3_pwm_stop (brushless3_t *ctx) |
Stop PWM module. | |
err_t | brushless3_pwm_start (brushless3_t *ctx) |
Start PWM module. | |
void brushless3_cfg_setup | ( | brushless3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
err_t brushless3_check_fault_code | ( | brushless3_t * | ctx, |
uint8_t * | fault_code ) |
Check fault code function.
ctx | Click object. |
fault_code | - bit[ 7:6 ] : N/A; - bit[ 5 ] : Stuck in closed loop; - bit[ 4 ] : Stuck in open loop; - bit[ 3 ] : No motor; - bit[ 2 ] : Kt abnormal; - bit[ 1 ] : Speed abnormal; - bit[ 0 ] : Lock detection current limit; |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function check fault code by read 8-bit value from the target Fault Code register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_check_motor_lock | ( | brushless3_t * | ctx, |
uint8_t * | motor_lock ) |
Check indicate that the motor is locked function.
ctx | Click object. |
motor_lock | 0 - Device is operational; 1 - Device its into sleep or standby mode; |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function check indicate that the motor is locked by check bit4 from the target Status register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_check_over_temp | ( | brushless3_t * | ctx, |
uint8_t * | over_temp ) |
Check indicate device temperature is over its limits function.
ctx | Click object. |
over_temp | 0 - OK; 1 - Temperature is over its limits; |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function check indicate device temperature is over its limits by check bit7 from the target Status register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_check_sleep_mode | ( | brushless3_t * | ctx, |
uint8_t * | sleep_mode ) |
Check indicate that device went into sleep or standby mode function.
ctx | Click object. |
sleep_mode | 0 - Device is operational; 1 - Device its into sleep or standby mode; |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function check indicate device went into sleep or standby mode by check bit6 from the target Status register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_copy_eeprom | ( | brushless3_t * | ctx | ) |
Copy EEPROM data to register function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function copy EEPROM data to register by set bit5 to the target EECtrl register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_default_cfg | ( | brushless3_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description This function executes default configuration for Brushless3 click. err_t brushless3_dis_config | ( | brushless3_t * | ctx | ) |
Disable the writing to the configuration registers function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function enable the writing to the configuration registers by clear bit6 to the target EECtrl register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_dis_sleep_mode | ( | brushless3_t * | ctx | ) |
Disable entering into sleep or standby mode function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function set Analog mode by set bit7 to the target EECtrl register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_dis_write_eeprom | ( | brushless3_t * | ctx | ) |
Disable the writing to the EEPROM registers function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function disable the writing to the EEPROM registers by clear bit4 to the target EECtrl register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_en_config | ( | brushless3_t * | ctx | ) |
Enable the writing to the configuration registers function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function enable the writing to the configuration registers by set bit6 to the target EECtrl register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_en_prog_eeprom | ( | brushless3_t * | ctx | ) |
Set prog key function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function set prog key by write value of 0xB6 from the target Dev CTRL register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_en_write_eeprom | ( | brushless3_t * | ctx | ) |
Enable the writing to the EEPROM registers function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function enable the writing to the EEPROM registers by set bit4 to the target EECtrl register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. void brushless3_forward_direction | ( | brushless3_t * | ctx | ) |
Set the direction of rotation in the forward direction function.
ctx | Click object. |
@description Function set the direction of rotation in the forward direction by sets PWM and RST pin on Brushless 3 Click board.
uint8_t brushless3_get_int_pin | ( | brushless3_t * | ctx | ) |
Get Interrupt pin state function.
ctx | Click object. |
@description Function get Interrupt ( INT ) pin state of Brushless 3 Click board.
err_t brushless3_get_period | ( | brushless3_t * | ctx, |
float * | period ) |
Get motor period function.
ctx | Click object. |
period | float value of motor period ( ms ); |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function get motor period by read value from the two target Motor Period 1 and 2 register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_get_speed | ( | brushless3_t * | ctx, |
float * | speed ) |
Get speed function.
ctx | Click object. |
speed | float value of motor speed ( Hz ); |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function get speed by read value from the two target Motor Speed 1 and 2 register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_get_speed_cmd | ( | brushless3_t * | ctx, |
float * | speed_cmd ) |
Get the speed command ( % ) based on analog or PWM or I2C function.
ctx | Click object. |
speed_cmd | float speed command ( % ); |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function get the speed command ( % ) based on analog or PWM or I2C by read the value from the target Speed CMD register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_get_supply_voltage | ( | brushless3_t * | ctx, |
float * | voltage ) |
Get the supply voltage function.
ctx | Click object. |
voltage | float value of the supply voltage; |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function get the supply voltage by read the value from the target Supply Voltage register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_get_vel_const | ( | brushless3_t * | ctx, |
float * | velocity ) |
Get measured velocity constant function.
ctx | Click object. |
velocity | float value of velocity constant ( V/Hz ); |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function get measured velocity constant by read value from the two target Motor KT 1 and 2 register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_init | ( | brushless3_t * | ctx, |
brushless3_cfg_t * | cfg ) |
Initialization function.
brushless3 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
err_t brushless3_pwm_start | ( | brushless3_t * | ctx | ) |
Start PWM module.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description This function starts PWM module. err_t brushless3_pwm_stop | ( | brushless3_t * | ctx | ) |
Stop PWM module.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description This function stops PWM module. err_t brushless3_read_data | ( | brushless3_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | read_data ) |
Read function.
ctx | Click object. |
reg_addr | Register address. |
read_data | Byte of data read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description This function reads data from the desired register. void brushless3_reverse_direction | ( | brushless3_t * | ctx | ) |
Set the direction of rotation in the reverse direction function.
ctx | Click object. |
@description Function set the direction of rotation in the reverse direction by sets PWM and clear RST pin on Brushless 3 Click board.
err_t brushless3_set_an_mode | ( | brushless3_t * | ctx | ) |
Set Analog mode function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function set Analog mode by clear bit1 to the target SysOpt9 register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_set_default_param | ( | brushless3_t * | ctx | ) |
Set default parameter function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function set default parameter by write the default data to the a few target 8-bit register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_set_duty_cycle | ( | brushless3_t * | ctx, |
float | duty_cycle ) |
Generic sets PWM duty cycle.
ctx | Click object. |
duty_cycle | Duty cycle. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description This function sets the PWM duty cycle. err_t brushless3_set_pwm_mode | ( | brushless3_t * | ctx | ) |
Set PWM mode function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function set PWM mode by set bit1 to the target SysOpt9 register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_set_speed | ( | brushless3_t * | ctx, |
uint16_t | motor_speed_hz ) |
Set speed function.
ctx | Click object. |
motor_speed_hz | value of motor speed ( Hz ); |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function set speed by write the desired value to the two target Speed Ctrl 1 and 2 register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_set_speed_pwm | ( | brushless3_t * | ctx, |
uint16_t | motor_speed_hz ) |
Set speed PWM function.
ctx | Click object. |
motor_speed_hz | value of motor speed ( Hz ); |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description Function set speed by write the desired value to the two target Speed Ctrl 1 and 2 register address of DRV10983 sensorless BLDC motor driver on Brushless 3 click board. err_t brushless3_write_data | ( | brushless3_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t | write_data ) |
Write function.
ctx | Click object. |
reg_addr | Register address. |
write_data | Byte of data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description This function writes data to the desired register.