| BLDC control on ATAVRMC303 with ATxMega128A1

Macros | Enumerations
config_motor.h File Reference

,v More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | CURRENT_LOOP 2
#define | IMAX (6 * 10) /* 6 amps */
#define | K_cur_scal 4
#define | K_pos_scal 5
#define | K_SPEED 34152
#define | K_speed_scal 4
#define | Kd_cur 0
#define | Kd_pos 20
#define | Kd_speed 0
#define | Ki_cur 3
#define | Ki_pos 3
#define | Ki_speed 4
#define | Kp_cur 1
#define | Kp_pos 9
#define | Kp_speed 6
#define | n_SAMPLE 8
#define | OPEN_LOOP 0
#define | SPEED_LOOP 1

## Enumerations
enum | { HS_001 =1, HS_010 =2, HS_011 =3, HS_100 =4, HS_101 =5, HS_110 =6 }
| This enumeration contains the 6 differents values for the Hall Sensors See design document. More...
enum | { RUN = TRUE, STOP = FALSE }
| Define the two states of the motor. More...
enum | { CCW = TRUE, CW = FALSE }
| Define Direction of rotor : CCW and CW. More...

## Detailed Description

,v

Copyright (c) 2007 Atmel.

Motor Configuration

Version
  1.16

Definition in file config_motor.h.

## Macro Definition Documentation

## ◆ CURRENT_LOOP

#define CURRENT_LOOP 2

Definition at line 48 of file config_motor.h.

Referenced by mc_regulation_loop(), and mc_set_Current_Loop().

## ◆ IMAX

#define IMAX (6 * 10) /* 6 amps */

Definition at line 96 of file config_motor.h.

## ◆ K_cur_scal

#define K_cur_scal 4

Definition at line 75 of file config_motor.h.

Referenced by mc_control_current().

## ◆ K_pos_scal

#define K_pos_scal 5

Definition at line 76 of file config_motor.h.

## ◆ K_SPEED

#define K_SPEED 34152

Definition at line 82 of file config_motor.h.

Referenced by mc_estimation_speed().

## ◆ K_speed_scal

#define K_speed_scal 4

Definition at line 74 of file config_motor.h.

Referenced by mc_control_speed().

## ◆ Kd_cur

#define Kd_cur 0

Definition at line 63 of file config_motor.h.

## ◆ Kd_pos

#define Kd_pos 20

Definition at line 68 of file config_motor.h.

## ◆ Kd_speed

#define Kd_speed 0

Definition at line 58 of file config_motor.h.

## ◆ Ki_cur

#define Ki_cur 3

Definition at line 62 of file config_motor.h.

Referenced by mc_control_current().

## ◆ Ki_pos

#define Ki_pos 3

Definition at line 67 of file config_motor.h.

## ◆ Ki_speed

#define Ki_speed 4

Definition at line 57 of file config_motor.h.

Referenced by mc_control_speed().

## ◆ Kp_cur

#define Kp_cur 1

Definition at line 61 of file config_motor.h.

Referenced by mc_control_current().

## ◆ Kp_pos

#define Kp_pos 9

Definition at line 66 of file config_motor.h.

## ◆ Kp_speed

#define Kp_speed 6

Definition at line 56 of file config_motor.h.

Referenced by mc_control_speed().

## ◆ n_SAMPLE

#define n_SAMPLE 8

Definition at line 43 of file config_motor.h.

Referenced by mc_estimation_speed().

## ◆ OPEN_LOOP

#define OPEN_LOOP 0

Definition at line 46 of file config_motor.h.

Referenced by mc_regulation_loop(), and mc_set_Open_Loop().

## ◆ SPEED_LOOP

#define SPEED_LOOP 1

Definition at line 47 of file config_motor.h.

Referenced by mc_regulation_loop(), and mc_set_Speed_Loop().

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

This enumeration contains the 6 differents values for the Hall Sensors See design document.

In this application, just 3 hall sensor are used Hall Sensor : position 1 to 6

Enumerator
HS_001 |
HS_010 |
HS_011 |
HS_100 |
HS_101 |
HS_110 |

Definition at line 23 of file config_motor.h.

23 {HS_001=1,HS_010=2,HS_011=3,HS_100=4,HS_101=5,HS_110=6};
HS_101
Definition: config_motor.h:23
HS_110
Definition: config_motor.h:23
HS_010
Definition: config_motor.h:23
HS_001
Definition: config_motor.h:23
HS_100
Definition: config_motor.h:23
HS_011
Definition: config_motor.h:23

## ◆ anonymous enum

anonymous enum

Define the two states of the motor.

Enumerator
RUN |
STOP |

Definition at line 29 of file config_motor.h.

29 {RUN = TRUE, STOP = FALSE};
STOP
Definition: config_motor.h:29
RUN
Definition: config_motor.h:29

## ◆ anonymous enum

anonymous enum

Define Direction of rotor : CCW and CW.

Enumerator
CCW |
CW |

Definition at line 34 of file config_motor.h.

34 {CCW = TRUE, CW = FALSE};
CW
Definition: config_motor.h:34
CCW
Definition: config_motor.h:34