Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
layout.h
- Committer:
- bwang
- Date:
- 2018-02-10
- Revision:
- 195:b61a734eb50c
- Parent:
- 191:66861311bdcd
File content as of revision 195:b61a734eb50c:
#ifndef __LAYOUT_H
#define __LAYOUT_H
#define PWMA PA_8
#define PWMB PA_9
#define PWMC PA_10
#define EN PB_15
#define IA PA_4
#define IB PB_0
#define TH_PIN PB_8
#define LOG_TX PC_10
#define LOG_RX PC_11
#define I_SCALE_RAW 25.0f //mv/A
#define R_UP 12000.0f //ohms
#define R_DOWN 3600.0f //ohms
#define R_BIAS 3600.0f //ohms
#define AVDD 3300.0f //mV
/*allows for inverting power modules*/
#define set_dtc(phase, value) *phase = (value)
/*inverter linearity limit*/
#define LINEAR_DTC_MAX 0.945f
//don't change these!
#define I_OFFSET (AVDD * R_DOWN * R_UP / (R_DOWN * R_UP + R_BIAS * (R_DOWN + R_UP)))
#define I_SCALE (R_BIAS * R_DOWN * I_SCALE_RAW / (R_DOWN * R_UP + R_BIAS * (R_DOWN + R_UP)))
#define PI 3.141593f
#endif