#include "config.h"
#include "mc_drv.h"
#include "mc_interface.h"
#include "mc_control.h"
#include "stdio.h"

Go to the source code of this file.
Functions | |
| void | init_amplifier_1 (void) |
| init Amplifier 1 | |
| void | mc_ADC_Scheduler (void) |
| Launch the sampling procedure to get current value. | |
| void | mc_disable_during_inrush (void) |
| the purpose of this function is to disable the overcurrent detection during startup (inrush current) | |
| void | mc_duty_cycle (U8 level) |
| External interruption Sensor (A) mode toggle. | |
| void | mc_estimation_speed (void) |
| Timer0 Overflow for speed measurement. | |
| U8 | mc_get_hall (void) |
| Get the value of hall sensors (1 to 6). | |
| void | mc_init_HW (void) |
| init HW | |
| void | mc_init_timer0 (void) |
| Launch the regulation loop (see main.c) . | |
| void | mc_init_timer1 (void) |
| timer 1 Configuration Use to generate a 250us activation for sampling speed regulation | |
| void | mc_inrush_task (void) |
| the purpose of this function is to manage the delay used when the overcurrent detection is disabled | |
| void | mc_set_Over_Current (U8 Level) |
| Set the Over Current threshold. | |
| void | mc_switch_commutation (U8 position) |
| Set the Switching Commutation value on outputs according to sensor or estimation position. | |
| void | PSC0_Init (unsigned int OCRnRB, unsigned int OCRnSB, unsigned int OCRnRA, unsigned int OCRnSA) |
| Initialization of PWM generator PSC0. | |
| void | PSC1_Init (unsigned int OCRnRB, unsigned int OCRnSB, unsigned int OCRnRA, unsigned int OCRnSA) |
| Initialization of PWM generator PSC1. | |
| void | PSC2_Init (unsigned int OCRnRB, unsigned int OCRnSB, unsigned int OCRnRA, unsigned int OCRnSA) |
| Initialization of PWM generator PSC2. | |
Variables | |
| char | ADC_State = FREE |
| U16 | average = 0 |
| U8 | count = 1 |
| Bool | current_EOC = FALSE |
| Bool | g_mc_read_enable = FALSE |
| Bool | g_tick = FALSE |
| Use for control the sampling period value. | |
| U16 | inrush_delay = 0 |
| Bool | inrush_mask_flag = FALSE |
| U8 | ovf_timer = 0 |
| U8 | PWMxB |
| char | State = CONV_INIT |
Copyright (c) 2008 Atmel.
Motor Control Driver level :
Definition in file mc_drv.c.
| void init_amplifier_1 | ( | void | ) |
| void mc_ADC_Scheduler | ( | void | ) |
Launch the sampling procedure to get current value.
Definition at line 296 of file mc_drv.c.
| void mc_disable_during_inrush | ( | void | ) |
the purpose of this function is to disable
the overcurrent detection during startup (inrush current)
Definition at line 315 of file mc_drv.c.
Referenced by mci_retry_run(), and mci_run().
| void mc_duty_cycle | ( | U8 | level | ) |
External interruption Sensor (A) mode toggle.
Definition at line 180 of file mc_drv.c.
Referenced by mci_retry_run(), and mci_run().
| void mc_estimation_speed | ( | void | ) |
Timer0 Overflow for speed measurement.
Definition at line 265 of file mc_drv.c.
| U8 mc_get_hall | ( | void | ) |
Get the value of hall sensors (1 to 6).
| return | an unsigned char value of hall sensor |
Definition at line 119 of file mc_drv.c.
References HALL_SENSOR_VALUE.
Referenced by mci_retry_run(), and mci_run().
00120 { 00121 return HALL_SENSOR_VALUE(); 00122 }
| void mc_init_HW | ( | void | ) |
| void mc_init_timer0 | ( | void | ) |
Launch the regulation loop (see main.c) .
Definition at line 239 of file mc_drv.c.
| void mc_init_timer1 | ( | void | ) |
| void mc_inrush_task | ( | void | ) |
| void mc_set_Over_Current | ( | U8 | Level | ) |
| void mc_switch_commutation | ( | U8 | position | ) |
Set the Switching Commutation value on outputs according to sensor or estimation position.
| position | (1 to 6) and direction (FORWARD or BACKWARD) |
Definition at line 190 of file mc_drv.c.
Referenced by mci_retry_run(), and mci_run().
| void PSC0_Init | ( | unsigned int | OCRnRB, | |
| unsigned int | OCRnSB, | |||
| unsigned int | OCRnRA, | |||
| unsigned int | OCRnSA | |||
| ) |
| void PSC1_Init | ( | unsigned int | OCRnRB, | |
| unsigned int | OCRnSB, | |||
| unsigned int | OCRnRA, | |||
| unsigned int | OCRnSA | |||
| ) |
| void PSC2_Init | ( | unsigned int | OCRnRB, | |
| unsigned int | OCRnSB, | |||
| unsigned int | OCRnRA, | |||
| unsigned int | OCRnSA | |||
| ) |
| Bool current_EOC = FALSE |
| Bool g_mc_read_enable = FALSE |
| U16 inrush_delay = 0 |
| Bool inrush_mask_flag = FALSE |
1.5.7.1