![]() |
BLDC control on ATAVRMC303 with ATxMega128A1
|

Go to the source code of this file.
Functions | |
| U8 | mc_get_motor_direction (void) |
| U8 | mc_get_motor_speed (void) |
| U8 | mc_get_potentiometer_value (void) |
| Get the potentiometer value. More... | |
| void | mc_init () |
| use to init programm More... | |
| Bool | mc_motor_is_running (void) |
| get the motor state More... | |
| void | mc_set_motor_measured_speed (U8 measured_speed) |
| set Measured of speed (for initialization) More... | |
| void | mc_set_potentiometer_value (U8 potentiometer) |
| Set the 'mc_potentiometer_value' variable with the potentiometer value. More... | |
| void | mci_backward (void) |
| void | mci_forward (void) |
| U16 | mci_get_measured_current (void) |
| Get the current measured in the motor. More... | |
| U8 | mci_get_measured_speed (void) |
| Measured of speed. More... | |
| void | mci_retry_run (void) |
| mci_retry_run retry to run if speed is null More... | |
| void | mci_run (void) |
| mci_run run the motor with parameter More... | |
| void | mci_set_motor_speed (U8 speed) |
| void | mci_set_speed (U16 speed) |
| void | mci_stop (void) |
| mci_stop stop the motor And reset the speed measured value. More... | |
| void | mci_store_measured_current (U16 current) |
| Set the variable 'mc_measured_current' for initialization. More... | |
Variables | |
| U8 | mc_cmd_speed = 0 |
| User Input parameter to set motor speed. More... | |
| U8 | mc_measured_speed = 0 |
| Motor Input parameter to get the motor speed. More... | |
| U8 | mc_potentiometer_value = 0 |
| Motor Input to set the motor speed. More... | |
| Bool | mci_direction = CW |
| User Input parameter to set motor direction. More... | |
| U32 | mci_measured_current = 0 |
| Motor Input parameter to get the motor current. More... | |
| Bool | mci_run_stop = FALSE |
| User Input parameter to launch or stop the motor. More... | |
| U8 mc_get_motor_direction | ( | void | ) |
Definition at line 148 of file mc_interface.c.
References mci_direction.
Referenced by mc_switch_commutation().
| U8 mc_get_motor_speed | ( | void | ) |
Definition at line 118 of file mc_interface.c.
References mc_cmd_speed.
Referenced by mc_regulation_loop(), and mc_switch_commutation().
| U8 mc_get_potentiometer_value | ( | void | ) |
Get the potentiometer value.
Definition at line 199 of file mc_interface.c.
References mc_potentiometer_value.
Referenced by main(), mc_regulation_loop(), and UpdateScreen().
| void mc_init | ( | void | ) |
use to init programm
Definition at line 92 of file mc_interface.c.
References mc_init_HW(), mc_set_motor_measured_speed(), mci_forward(), mci_set_motor_speed(), and mci_stop().
Referenced by main().

| Bool mc_motor_is_running | ( | void | ) |
get the motor state
Definition at line 70 of file mc_interface.c.
References mci_run_stop.
Referenced by mc_switch_commutation(), and ovfl_timer0().
| void mc_set_motor_measured_speed | ( | U8 | measured_speed | ) |
set Measured of speed (for initialization)
Definition at line 158 of file mc_interface.c.
References mc_measured_speed.
Referenced by mc_estimation_speed(), mc_init(), and ovfl_timer0().
| void mc_set_potentiometer_value | ( | U8 | potentiometer | ) |
Set the 'mc_potentiometer_value' variable with the potentiometer value.
Definition at line 209 of file mc_interface.c.
References mc_potentiometer_value.
Referenced by mc_ADC_Scheduler().
| void mci_backward | ( | void | ) |
Definition at line 138 of file mc_interface.c.
References CCW, and mci_direction.
Referenced by ushell_task().
| void mci_forward | ( | void | ) |
Definition at line 128 of file mc_interface.c.
References CW, and mci_direction.
Referenced by mc_init(), and ushell_task().
| U16 mci_get_measured_current | ( | void | ) |
Get the current measured in the motor.
Definition at line 179 of file mc_interface.c.
References mci_measured_current.
Referenced by mc_control_current(), and ushell_task().
| U8 mci_get_measured_speed | ( | void | ) |
Measured of speed.
Definition at line 169 of file mc_interface.c.
References mc_measured_speed.
Referenced by mc_control_speed(), UpdateScreen(), and ushell_task().
| void mci_retry_run | ( | void | ) |
mci_retry_run retry to run if speed is null
Definition at line 55 of file mc_interface.c.
References mc_disable_during_inrush(), mc_duty_cycle(), mc_get_Duty_Cycle(), mc_get_hall(), mc_regulation_loop(), mc_switch_commutation(), and mci_run_stop.
Referenced by ovfl_timer0().

| void mci_run | ( | void | ) |
mci_run run the motor with parameter
Definition at line 34 of file mc_interface.c.
References mc_disable_during_inrush(), mc_duty_cycle(), mc_get_Duty_Cycle(), mc_get_hall(), mc_regulation_loop(), mc_switch_commutation(), and mci_run_stop.
Referenced by main(), and ushell_task().

| void mci_set_motor_speed | ( | U8 | speed | ) |
Definition at line 108 of file mc_interface.c.
References mc_cmd_speed.
Referenced by main(), mc_init(), and mci_set_speed().
| void mci_set_speed | ( | U16 | speed | ) |
Definition at line 214 of file mc_interface.c.
References mci_set_motor_speed().
Referenced by ushell_task().

| void mci_stop | ( | void | ) |
mci_stop stop the motor And reset the speed measured value.
Definition at line 81 of file mc_interface.c.
References mci_run_stop.
Referenced by mc_init(), and ushell_task().
| void mci_store_measured_current | ( | U16 | current | ) |
Set the variable 'mc_measured_current' for initialization.
Definition at line 189 of file mc_interface.c.
References mci_measured_current.
| U8 mc_cmd_speed = 0 |
User Input parameter to set motor speed.
Definition at line 22 of file mc_interface.c.
Referenced by mc_get_motor_speed(), and mci_set_motor_speed().
| U8 mc_measured_speed = 0 |
Motor Input parameter to get the motor speed.
Definition at line 24 of file mc_interface.c.
Referenced by mc_set_motor_measured_speed(), and mci_get_measured_speed().
| U8 mc_potentiometer_value = 0 |
Motor Input to set the motor speed.
Definition at line 26 of file mc_interface.c.
Referenced by mc_get_potentiometer_value(), and mc_set_potentiometer_value().
| Bool mci_direction = CW |
User Input parameter to set motor direction.
Definition at line 20 of file mc_interface.c.
Referenced by mc_get_motor_direction(), mci_backward(), mci_forward(), UpdateScreen(), and ushell_task().
| U32 mci_measured_current = 0 |
Motor Input parameter to get the motor current.
Definition at line 25 of file mc_interface.c.
Referenced by mci_get_measured_current(), and mci_store_measured_current().
| Bool mci_run_stop = FALSE |
User Input parameter to launch or stop the motor.
Definition at line 21 of file mc_interface.c.
Referenced by mc_motor_is_running(), mci_retry_run(), mci_run(), mci_stop(), UpdateScreen(), and ushell_task().