Browse Source

硬件控制基本稳定

master
zhaohe 2 years ago
parent
commit
2a2d14d135
  1. 4
      a8000_temperature_ctl.launch
  2. 2
      sdk
  3. 35
      usrc/driver.cpp

4
a8000_temperature_ctl.launch

@ -51,8 +51,8 @@
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.low_power_debug" value="disable"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.max_halt_delay" value="2"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.reset_strategy" value="system_reset"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_check_serial_number" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value="001B00273132510838363431"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_check_serial_number" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value="0046002C3132510838363431"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.watchdog_config" value="none"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkenable_rtos" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkrestart_configurations" value="{&quot;fVersion&quot;:1,&quot;fItems&quot;:[{&quot;fDisplayName&quot;:&quot;Reset&quot;,&quot;fIsSuppressible&quot;:false,&quot;fResetAttribute&quot;:&quot;Software system reset&quot;,&quot;fResetStrategies&quot;:[{&quot;fDisplayName&quot;:&quot;Software system reset&quot;,&quot;fLaunchAttribute&quot;:&quot;system_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Hardware reset&quot;,&quot;fLaunchAttribute&quot;:&quot;hardware_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset hardware\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Core reset&quot;,&quot;fLaunchAttribute&quot;:&quot;core_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset core\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;None&quot;,&quot;fLaunchAttribute&quot;:&quot;no_reset&quot;,&quot;fGdbCommands&quot;:[],&quot;fCmdOptions&quot;:[&quot;-g&quot;]}],&quot;fGdbCommandGroup&quot;:{&quot;name&quot;:&quot;Additional commands&quot;,&quot;commands&quot;:[]},&quot;fStartApplication&quot;:true}]}"/>

2
sdk

@ -1 +1 @@
Subproject commit 89a7ff2c9c2328ba294d19ca501c2303a0942659
Subproject commit 9ac1223e1e0515c3096478a37c9b930becdd2cad

35
usrc/driver.cpp

@ -2,7 +2,7 @@
using namespace iflytop;
#define TIMER2_FREQ 1000
#define TIMER1_FREQ 1000
#define HEART_SHAFT false
#define ENABL_TRACE false
#define TAG "DRIVER"
/*******************************************************************************
@ -181,38 +181,39 @@ void PumpCtrlModule::clearError() { return pump.clearError(); }
/*******************************************************************************
* ÅÁûÌùÅäÖÃ *
*******************************************************************************/
#define PELTIER_POLARITY false
DRV8710::config_t peltier_config0 = {
.pwm_cfg =
{
.name = "peltier0_pwm",
.name = "peltier1_pwm",
.htim = &htim1,
.freq = TIMER1_FREQ,
.polarity = false,
},
.in1_chnannel_index = 1, // PE9
.in2 = PE11,
.nsleep = PB2,
.nfault = PB3,
.sensePin = PB4,
.shaft = HEART_SHAFT,
.enableTrace = true,
.in1_chnannel_index = 3, // PE13
.in2 = PE14,
.nsleep = PB13,
.nfault = PB14,
.sensePin = PB15,
.shaft = PELTIER_POLARITY,
.enableTrace = false,
};
DRV8710::config_t peltier_config1 = {
.pwm_cfg =
{
.name = "peltier1_pwm",
.name = "peltier0_pwm",
.htim = &htim1,
.freq = TIMER1_FREQ,
.polarity = false,
},
.in1_chnannel_index = 3, // PE13
.in2 = PE14,
.nsleep = PB13,
.nfault = PB14,
.sensePin = PB15,
.shaft = HEART_SHAFT,
.enableTrace = true,
.in1_chnannel_index = 1, // PE9
.in2 = PE11,
.nsleep = PB2,
.nfault = PB3,
.sensePin = PB4,
.shaft = !PELTIER_POLARITY,
.enableTrace = false,
};
void PeltierCtrlModule::initialize(peltier_index_t index) {

Loading…
Cancel
Save