From bdd16b6a512cf7c7e4d53ad9fa1722f45c779d5e Mon Sep 17 00:00:00 2001 From: zhaohe Date: Thu, 30 Nov 2023 15:51:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BF=BB=E8=BD=AC=E7=94=B5=E7=A3=81=E9=98=80?= =?UTF-8?q?=E6=96=B9=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .settings/language.settings.xml | 4 +- dap.cfg | 2 +- ...e_disinfection_liquid_path_control Debug.launch | 96 ---------------------- pipeline_disinfection_liquid_path_control.cfg | 44 ++++++++++ pipeline_disinfection_liquid_path_control.launch | 13 ++- usrc/device.cpp | 4 +- usrc/main.cpp | 3 +- 7 files changed, 57 insertions(+), 109 deletions(-) delete mode 100644 pipeline_disinfection_liquid_path_control Debug.launch create mode 100644 pipeline_disinfection_liquid_path_control.cfg diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml index 6d9848e..85fd87c 100644 --- a/.settings/language.settings.xml +++ b/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/dap.cfg b/dap.cfg index b41d541..3b8ae1c 100644 --- a/dap.cfg +++ b/dap.cfg @@ -20,7 +20,7 @@ set ENABLE_LOW_POWER 1 set STOP_WATCHDOG 1 # STlink Debug clock frequency -set CLOCK_FREQ 4000 +set CLOCK_FREQ 1000 # Reset configuration # use hardware reset diff --git a/pipeline_disinfection_liquid_path_control Debug.launch b/pipeline_disinfection_liquid_path_control Debug.launch deleted file mode 100644 index 0bee7b1..0000000 --- a/pipeline_disinfection_liquid_path_control Debug.launch +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pipeline_disinfection_liquid_path_control.cfg b/pipeline_disinfection_liquid_path_control.cfg new file mode 100644 index 0000000..ef37116 --- /dev/null +++ b/pipeline_disinfection_liquid_path_control.cfg @@ -0,0 +1,44 @@ +# This is an genericBoard board with a single STM32F407VETx chip +# +# Generated by STM32CubeIDE +# Take care that such file, as generated, may be overridden without any early notice. Please have a look to debug launch configuration setup(s) + +source [find interface/stlink-dap.cfg] + + +set WORKAREASIZE 0x8000 + +transport select "dapdirect_swd" + +set CHIPNAME STM32F407VETx +set BOARDNAME genericBoard + +# Enable debug when in low power modes +set ENABLE_LOW_POWER 1 + +# Stop Watchdog counters when halt +set STOP_WATCHDOG 1 + +# STlink Debug clock frequency +set CLOCK_FREQ 8000 + +# Reset configuration +# use hardware reset, connect under reset +# connect_assert_srst needed if low power mode application running (WFI...) +reset_config srst_only srst_nogate connect_assert_srst +set CONNECT_UNDER_RESET 1 +set CORE_RESET 0 + +# ACCESS PORT NUMBER +set AP_NUM 0 +# GDB PORT +set GDB_PORT 3333 + + + + + +# BCTM CPU variables + +source [find target/stm32f4x.cfg] + diff --git a/pipeline_disinfection_liquid_path_control.launch b/pipeline_disinfection_liquid_path_control.launch index 5a3ef93..1915d2c 100644 --- a/pipeline_disinfection_liquid_path_control.launch +++ b/pipeline_disinfection_liquid_path_control.launch @@ -34,16 +34,15 @@ - + - - + @@ -65,8 +64,8 @@ - - + + @@ -80,9 +79,9 @@ - + - + diff --git a/usrc/device.cpp b/usrc/device.cpp index 2506472..c47e3a3 100644 --- a/usrc/device.cpp +++ b/usrc/device.cpp @@ -154,8 +154,8 @@ void device_init() { m_huachengPressureSensor.regSubmodule(4, &huart3, 4); } - OUT_PD14.initAsOutput(PD14, ZGPIO::kMode_nopull, true, false); - OUT_PD15.initAsOutput(PD15, ZGPIO::kMode_nopull, true, false); + OUT_PD14.initAsOutput(PD14, ZGPIO::kMode_nopull, false, true); + OUT_PD15.initAsOutput(PD15, ZGPIO::kMode_nopull, false, true); } void setmotor(TMC5130 *motor, int16_t acc_rpm2, int16_t rpm, int16_t idlepower, int16_t power) { diff --git a/usrc/main.cpp b/usrc/main.cpp index cde9b92..64fe625 100644 --- a/usrc/main.cpp +++ b/usrc/main.cpp @@ -15,6 +15,7 @@ void umain(void) { ZHALCORE::getInstance()->initialize(oscfg); ZLOGI(TAG, "pipeline_disinfection_liquid_path_control:%s", VERSION); + device_init(); uart_debug_fn_reg(); can_cmd_reg_fn_reg(); @@ -25,4 +26,4 @@ void umain(void) { HAL_IWDG_Refresh(&hiwdg); } } -} \ No newline at end of file +}