add ODrive v3.6

This commit is contained in:
Oskar Weigl
2019-03-18 17:57:44 -07:00
parent 40f24fd30b
commit 901311b582
4 changed files with 12 additions and 4 deletions
+2 -2
View File
@@ -24,8 +24,8 @@
"STM32F405xx",
"USE_HAL_DRIVER",
"HW_VERSION_MAJOR=3",
"HW_VERSION_MINOR=5",
"HW_VERSION_VOLTAGE=24",
"HW_VERSION_MINOR=6",
"HW_VERSION_VOLTAGE=56",
"USB_PROTOCOL_NATIVE",
"__weak=\"__attribute__((weak))\"",
"__packed=\"__attribute__((__packed__))\"",
+1 -1
View File
@@ -171,7 +171,7 @@
#define CURRENT_MEAS_PERIOD ( (float)2*TIM_1_8_PERIOD_CLOCKS*(TIM_1_8_RCR+1) / (float)TIM_1_8_CLOCK_HZ )
#define CURRENT_MEAS_HZ ( (float)(TIM_1_8_CLOCK_HZ) / (float)(2*TIM_1_8_PERIOD_CLOCKS*(TIM_1_8_RCR+1)) )
#if HW_VERSION_VOLTAGE == 48
#if HW_VERSION_VOLTAGE >= 48
#define VBUS_S_DIVIDER_RATIO 19.0f
#define VBUS_OVERVOLTAGE_LEVEL 52.0f
#elif HW_VERSION_VOLTAGE == 24
+1 -1
View File
@@ -77,7 +77,7 @@ struct BoardConfig_t {
float brake_resistance = 0.47f; // [ohm]
#endif
float dc_bus_undervoltage_trip_level = 8.0f; //<! [V] minimum voltage below which the motor stops operating
float dc_bus_overvoltage_trip_level = 1.08f * HW_VERSION_VOLTAGE; //<! [V] maximum voltage above which the motor stops operating.
float dc_bus_overvoltage_trip_level = 1.07f * HW_VERSION_VOLTAGE; //<! [V] maximum voltage above which the motor stops operating.
//<! This protects against cases in which the power supply fails to dissipate
//<! the brake power if the brake resistor is disabled.
//<! The default is 26V for the 24V board version and 52V for the 48V board version.
+8
View File
@@ -31,6 +31,14 @@ elseif boardversion == "v3.5-48V" then
boarddir = 'Board/v3'
FLAGS += "-DHW_VERSION_MAJOR=3 -DHW_VERSION_MINOR=5"
FLAGS += "-DHW_VERSION_VOLTAGE=48"
elseif boardversion == "v3.6-24V" then
boarddir = 'Board/v3'
FLAGS += "-DHW_VERSION_MAJOR=3 -DHW_VERSION_MINOR=6"
FLAGS += "-DHW_VERSION_VOLTAGE=24"
elseif boardversion == "v3.6-56V" then
boarddir = 'Board/v3'
FLAGS += "-DHW_VERSION_MAJOR=3 -DHW_VERSION_MINOR=6"
FLAGS += "-DHW_VERSION_VOLTAGE=56"
elseif boardversion == "" then
error("board version not specified - take a look at tup.config.default")
else