stmbl/shared/f3hw.h

53 lines
1.1 KiB
C
Raw Permalink Normal View History

2017-06-12 17:30:17 +00:00
//stmbl
2017-10-01 14:34:53 +00:00
/*#define AREF 3.338 // analog reference voltage
2017-09-12 16:41:10 +00:00
#define HV_EN_PIN GPIO_PIN_15
#define HV_EN_PORT GPIOA
#define HV_FAULT_PIN GPIO_PIN_7
#define HV_FAULT_PORT GPIOB
2017-09-12 18:03:02 +00:00
#define LED_PIN GPIO_PIN_8
#define LED_PORT GPIOA
2017-06-09 22:02:17 +00:00
2017-09-06 02:20:06 +00:00
#define VDIVUP 249000.0 * 2.0 //HV div pullup R1,R12
#define VDIVDOWN 3900.0 //HV div pulldown R2,R9
2017-10-01 14:34:53 +00:00
#define SHUNT 0.001 //shunt
2017-07-17 17:45:32 +00:00
#define SHUNT_PULLUP 15000.0
#define SHUNT_SERIE 470.0
2017-06-09 22:02:17 +00:00
#define PWM_U TIM8->CCR3
#define PWM_V TIM8->CCR2
#define PWM_W TIM8->CCR1
2017-06-12 17:30:17 +00:00
#define PWM_DEADTIME 0
2017-10-01 14:34:53 +00:00
#define PWM_RES 4800*/
2017-09-12 16:51:50 +00:00
2017-06-09 22:02:17 +00:00
//io board
//#define USB_CONNECT_PIN GPIO_PIN_15
//#define USB_CONNECT_PORT GPIOB
2017-06-12 17:30:17 +00:00
2017-10-01 14:34:53 +00:00
2017-06-12 17:30:17 +00:00
//otter
2017-07-17 17:45:32 +00:00
//TODO: swap v,w cur feedback
#define PWM_INVERT
2017-06-12 17:30:17 +00:00
#define AREF 3.3// analog reference voltage
#define VDIVUP 56000.0//HV div pullup R1,R12
#define VDIVDOWN 2000.0//HV div pulldown R2,R9
2017-10-01 14:34:53 +00:00
#define SHUNT 0.001//shunt
#define SHUNT_PULLUP 15000.0
#define SHUNT_SERIE 470.0
2017-06-12 17:30:17 +00:00
#define LED_Pin GPIO_PIN_0
#define LED_GPIO_Port GPIOA
2017-10-01 14:34:53 +00:00
#define PWM_RES 4800
2017-06-12 17:30:17 +00:00
#define PWM_U TIM8->CCR1
#define PWM_V TIM8->CCR2
#define PWM_W TIM8->CCR3
2017-10-01 14:34:53 +00:00
2017-06-12 17:30:17 +00:00
//ottercontrol
#define USB_DISCONNECT_PIN GPIO_PIN_13
#define USB_DISCONNECT_PORT GPIOC
#define PWM_DEADTIME 50