|
brazos-trapezoidal
|
Header for motor control analog conversions. More...
#include "uc.h"#include "Compiler_defs.h"#include "MathLib.h"#include "SRMCAtod_prm.h"#include "SRMCAtod_macros.h"

Go to the source code of this file.
Macros | |
| #define | SRMCATOD__GETADC1() PHASE_U_ATOD_REGISTER |
| #define | SRMCATOD__GETADC2() PHASE_V_ATOD_REGISTER |
| #define | SRMCATOD__GETDCBUSVOLTAGE() VDC_ATOD_REGISTER |
| #define | SRMCATOD__GETPOLE1() PHASE_VU_ATOD_REGISTER |
| #define | SRMCATOD__GETPOLE2() PHASE_VV_ATOD_REGISTER |
| #define | SRMCATOD__GETPOLE3() PHASE_VW_ATOD_REGISTER |
| #define | SRMCATOD__GETADC3() PHASE_U_ATOD_REGISTER2 |
| #define | SRMCATOD__GETADC4() PHASE_V_ATOD_REGISTER2 |
| #define | SRMCATOD__GETDCBUSVOLTAGE2() VDC_ATOD_REGISTER2 |
| #define | SRMCATOD__GETPOLE4() PHASE_VU_ATOD_REGISTER2 |
| #define | SRMCATOD__GETPOLE5() PHASE_VV_ATOD_REGISTER2 |
| #define | SRMCATOD__GETPOLE6() PHASE_VW_ATOD_REGISTER2 |
Functions | |
| void | SRMCAtod__Initialize (void) |
| INTERRUPT_DIRECTIVE void | SRMCAtod__ISR (void) |
| INTERRUPT_DIRECTIVE void | SRMCAtod__ISR2 (void) |
| void | SRMCAtod__DiagnosticHandler (void) |
| void | SRMCAtod__EnableDiagnostic (signed short int commanded_threshold) |
| SRMCATOD_DIAG_ERROR_TYPE | SRMCAtod__GetDiagnosticFeedback (void) |
| void | SRMCAtod__InitReadVref (void) |
| It read the Vref voltage at the start up. More... | |
| void | SRMCAtod__Read_Vref (void) |
| voltage reference reading, filtering and A/D conversion constants correction More... | |
| float | SRMCAtod__GetKRef (void) |
| This function is used to get the ad correction related the VREF. More... | |
Variables | |
| u_mc_t | PHASE_U_ATOD_REGISTER |
| u_mc_t | PHASE_V_ATOD_REGISTER |
| u_mc_t | PHASE_W_ATOD_REGISTER |
| u_mc_t | PHASE_VU_ATOD_REGISTER |
| u_mc_t | PHASE_VV_ATOD_REGISTER |
| u_mc_t | PHASE_VW_ATOD_REGISTER |
| u_mc_t | VDC_ATOD_REGISTER |
| u_mc_t | PHASE_U_ATOD_REGISTER2 |
| u_mc_t | PHASE_V_ATOD_REGISTER2 |
| u_mc_t | PHASE_W_ATOD_REGISTER2 |
| u_mc_t | PHASE_VU_ATOD_REGISTER2 |
| u_mc_t | PHASE_VV_ATOD_REGISTER2 |
| u_mc_t | PHASE_VW_ATOD_REGISTER2 |
| u_mc_t | VDC_ATOD_REGISTER2 |
Header for motor control analog conversions.
Definition in file SRMCAtod.h.
| #define SRMCATOD__GETADC1 | ( | ) | PHASE_U_ATOD_REGISTER |
Definition at line 72 of file SRMCAtod.h.
| #define SRMCATOD__GETADC2 | ( | ) | PHASE_V_ATOD_REGISTER |
Definition at line 73 of file SRMCAtod.h.
| #define SRMCATOD__GETADC3 | ( | ) | PHASE_U_ATOD_REGISTER2 |
Definition at line 81 of file SRMCAtod.h.
| #define SRMCATOD__GETADC4 | ( | ) | PHASE_V_ATOD_REGISTER2 |
Definition at line 82 of file SRMCAtod.h.
| #define SRMCATOD__GETDCBUSVOLTAGE | ( | ) | VDC_ATOD_REGISTER |
Definition at line 75 of file SRMCAtod.h.
| #define SRMCATOD__GETDCBUSVOLTAGE2 | ( | ) | VDC_ATOD_REGISTER2 |
Definition at line 84 of file SRMCAtod.h.
| #define SRMCATOD__GETPOLE1 | ( | ) | PHASE_VU_ATOD_REGISTER |
Definition at line 77 of file SRMCAtod.h.
| #define SRMCATOD__GETPOLE2 | ( | ) | PHASE_VV_ATOD_REGISTER |
Definition at line 78 of file SRMCAtod.h.
| #define SRMCATOD__GETPOLE3 | ( | ) | PHASE_VW_ATOD_REGISTER |
Definition at line 79 of file SRMCAtod.h.
| #define SRMCATOD__GETPOLE4 | ( | ) | PHASE_VU_ATOD_REGISTER2 |
Definition at line 86 of file SRMCAtod.h.
| #define SRMCATOD__GETPOLE5 | ( | ) | PHASE_VV_ATOD_REGISTER2 |
Definition at line 87 of file SRMCAtod.h.
| #define SRMCATOD__GETPOLE6 | ( | ) | PHASE_VW_ATOD_REGISTER2 |
Definition at line 88 of file SRMCAtod.h.
| enum SRMCATOD_CONVERTER_TYPE |
Definition at line 36 of file SRMCAtod.h.
| enum SRMCATOD_DIAG_CONFIG_TYPE |
Definition at line 42 of file SRMCAtod.h.
| enum SRMCATOD_DIAG_ERROR_TYPE |
Definition at line 51 of file SRMCAtod.h.
| enum SRMCATOD_DIAG_STATE_TYPE |
Definition at line 61 of file SRMCAtod.h.
| void SRMCAtod__DiagnosticHandler | ( | void | ) |
This function is a handler used to check 12 bits AD registers and converters status. May be used to test stuck at register failure and conversion errors. Checks all converters with all possible fixed values. this handler has no time dependency, may be used on handlers at 16KHz, 250us, 1ms 5ms or 25ms. Use functions to start tests and get feedbacks
Definition at line 162 of file SRMCAtod.c.
| void SRMCAtod__EnableDiagnostic | ( | signed short int | commanded_threshold | ) |
This function is a handler used to start checking 12 bits AD registers and converters status. Only restarts if feedback was updated or it's waiting for a check request.
Definition at line 171 of file SRMCAtod.c.
| SRMCATOD_DIAG_ERROR_TYPE SRMCAtod__GetDiagnosticFeedback | ( | void | ) |
This function gets converters status.
Definition at line 181 of file SRMCAtod.c.
| float SRMCAtod__GetKRef | ( | void | ) |
This function is used to get the ad correction related the VREF.
Definition at line 280 of file SRMCAtod.c.
| void SRMCAtod__Initialize | ( | void | ) |
It Initializes the module MCAtod peripheral and its variables. All 12 bits channels are converted when MTU4 TADCORB register matches with TCNT.
Definition at line 67 of file SRMCAtod.c.
| void SRMCAtod__InitReadVref | ( | void | ) |
It read the Vref voltage at the start up.
Definition at line 258 of file SRMCAtod.c.
| INTERRUPT_DIRECTIVE void SRMCAtod__ISR | ( | void | ) |
Definition at line 76 of file SRMCAtod.c.
| INTERRUPT_DIRECTIVE void SRMCAtod__ISR2 | ( | void | ) |
Definition at line 120 of file SRMCAtod.c.
| void SRMCAtod__Read_Vref | ( | void | ) |
voltage reference reading, filtering and A/D conversion constants correction
Definition at line 269 of file SRMCAtod.c.
|
extern |
Definition at line 48 of file mrvsfunc.c.
|
extern |
Definition at line 97 of file mrvsfunc.c.
|
extern |
Definition at line 49 of file mrvsfunc.c.
|
extern |
Definition at line 98 of file mrvsfunc.c.
|
extern |
Definition at line 51 of file mrvsfunc.c.
|
extern |
Definition at line 100 of file mrvsfunc.c.
|
extern |
Definition at line 52 of file mrvsfunc.c.
|
extern |
Definition at line 101 of file mrvsfunc.c.
|
extern |
Definition at line 53 of file mrvsfunc.c.
|
extern |
Definition at line 102 of file mrvsfunc.c.
|
extern |
Definition at line 50 of file mrvsfunc.c.
|
extern |
Definition at line 99 of file mrvsfunc.c.
|
extern |
Definition at line 54 of file mrvsfunc.c.
|
extern |
Definition at line 103 of file mrvsfunc.c.