Browse Source

update

master
zhaohe 11 months ago
parent
commit
741d7ebd75
  1. 29
      a8000_subboard.launch
  2. 13
      sdk/components/pipette_module/pipette_ctrl_module_v2.cpp
  3. 2
      usrc/main.cpp
  4. 44
      usrc/subboards/subboard80_cliptip/subboard80_cliptip.cpp

29
a8000_subboard.launch

@ -5,7 +5,7 @@
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_certif_path" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_check_enable" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_key_path" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_permission" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_permission" value="debug_non_secure_L3"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_live_expr" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_swv" value="false"/>
<intAttribute key="com.st.stm32cube.ide.mcu.debug.launch.formatVersion" value="2"/>
@ -24,22 +24,7 @@
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_trace_hclk" value="144000000"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.useRemoteTarget" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.vector_table" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.verify_flash_download" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.CTI_ALLOW_HALT" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.CTI_SIGNAL_HALT" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.DBG_DEVICE_SHAREABLE_ALLOWED" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.DBG_INTERFACE" value="Swd"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.DBG_INTERFACE_FREQUENCY" value="8000000.0"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.DBG_LOW_POWER_MODE_ALLOWED" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.DBG_RESET_MODE" value="connect_under_reset"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.DBG_STOP_WATCHDOG_THEN_HALTED_ALLOWED" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.OPENOCD_GENERATOR_OPTION" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.OPENOCD_NAME" value="&quot;${stm32cubeide_openocd_path}\openocd.exe&quot;"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.OPENOCD_OTHER_OPTIONS" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.OPENOCD_RESTART_CONFIGURATIONS" value="{&quot;fVersion&quot;:1,&quot;fItems&quot;:[{&quot;fDisplayName&quot;:&quot;Reset halt&quot;,&quot;fIsSuppressible&quot;:false,&quot;fResetAttribute&quot;:&quot;Reset halt&quot;,&quot;fResetStrategies&quot;:[{&quot;fDisplayName&quot;:&quot;Reset halt&quot;,&quot;fLaunchAttribute&quot;:&quot;monitor reset halt&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset halt&quot;],&quot;fCmdOptions&quot;:[]},{&quot;fDisplayName&quot;:&quot;Reset init&quot;,&quot;fLaunchAttribute&quot;:&quot;monitor reset init&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset init&quot;],&quot;fCmdOptions&quot;:[]},{&quot;fDisplayName&quot;:&quot;None&quot;,&quot;fLaunchAttribute&quot;:&quot;&quot;,&quot;fGdbCommands&quot;:[],&quot;fCmdOptions&quot;:[]}],&quot;fGdbCommandGroup&quot;:{&quot;name&quot;:&quot;Additional commands&quot;,&quot;commands&quot;:[]},&quot;fStartApplication&quot;:true},{&quot;fDisplayName&quot;:&quot;Reset init&quot;,&quot;fIsSuppressible&quot;:false,&quot;fResetAttribute&quot;:&quot;Reset init&quot;,&quot;fResetStrategies&quot;:[{&quot;fDisplayName&quot;:&quot;Reset halt&quot;,&quot;fLaunchAttribute&quot;:&quot;monitor reset halt&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset halt&quot;],&quot;fCmdOptions&quot;:[]},{&quot;fDisplayName&quot;:&quot;Reset init&quot;,&quot;fLaunchAttribute&quot;:&quot;monitor reset init&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset init&quot;],&quot;fCmdOptions&quot;:[]},{&quot;fDisplayName&quot;:&quot;None&quot;,&quot;fLaunchAttribute&quot;:&quot;&quot;,&quot;fGdbCommands&quot;:[],&quot;fCmdOptions&quot;:[]}],&quot;fGdbCommandGroup&quot;:{&quot;name&quot;:&quot;Additional commands&quot;,&quot;commands&quot;:[]},&quot;fStartApplication&quot;:true}]}"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.OPENOCD_SCRIPT" value="${ProjDirPath}\a8000_subboard.cfg"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.openocd.OPENOCD_SCRIPT_CHOICE" value="automated"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.openocdenable_rtos" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.verify_flash_download" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_allow_halt" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_signal_halt" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_logging" value="false"/>
@ -47,20 +32,20 @@
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_shared_stlink" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.frequency" value="0"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.halt_all_on_reset" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.log_file" value="D:\workspace\project_boditech_vidas_a8000_v3\a8000_subboard\Debug\st-link_gdbserver_log.txt"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.log_file" value="D:\workspace\p_lusterinc\a8000_subboard\Debug\st-link_gdbserver_log.txt"/>
<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=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value="001B00273132510838363431"/>
<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}]}"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.enableRtosProxy" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyCustomProperties" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriver" value="freertos"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriver" value="threadx"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriverAuto" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriverPort" value="ARM_CM0"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriverPort" value="cortex_m0"/>
<intAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyPort" value="60000"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
@ -93,6 +78,6 @@
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;"/>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;&gt;&lt;gdbmemoryBlockExpression address=&quot;536939692&quot; label=&quot;&amp;amp;(((((((((this)-&amp;gt;tmcPowerGroup)).m_motor)[0]).m_mutex)).recursiveMutex))&quot;/&gt;&lt;gdbmemoryBlockExpression address=&quot;536883284&quot; label=&quot;&amp;amp;(((((((DEVICE)-&amp;gt;m_motor)[0]).m_mutex)).recursiveMutex))&quot;/&gt;&lt;gdbmemoryBlockExpression address=&quot;536939616&quot; label=&quot;&amp;amp;(((this)-&amp;gt;tmcPowerGroup))&quot;/&gt;&lt;/memoryBlockExpressionList&gt;"/>
<stringAttribute key="process_factory_id" value="com.st.stm32cube.ide.mcu.debug.launch.HardwareDebugProcessFactory"/>
</launchConfiguration>

13
sdk/components/pipette_module/pipette_ctrl_module_v2.cpp

@ -769,6 +769,17 @@ void PipetteModuleV2::push_snesor_sample_data(int32_t motor_pos, int32_t cap_val
capturedata_num++;
}
int32_t PipetteModuleV2::pipette_get_sensor_sample_data(int32_t index, int32_t *motor_pos, int32_t *cval, int32_t *pval) {
if (index > capturedata_num) return err::kparam_out_of_range;
*motor_pos = capturedata_buf[index].motor_pos;
*cval = capturedata_buf[index].cap_val;
*pval = capturedata_buf[index].pressure_val;
return 0;
}
int32_t PipetteModuleV2::pipette_get_sensor_sample_data_num(int32_t *num) {
*num = capturedata_num;
return 0;
}
/***********************************************************************************************************************
* SLICE *
***********************************************************************************************************************/
@ -799,6 +810,8 @@ int32_t PipetteModuleV2::bfcall(int32_t cmdid, uint8_t *param, int32_t len) {
if (cmdid == kpipette_aspirate_infer_pressure) goto check;
if (cmdid == kpipette_aspirate_infer_eigen_time) goto check;
return 0;
check:
if (!m_state.enable) {
return err::kstep_motor_not_enable;

2
usrc/main.cpp

@ -41,6 +41,8 @@ void StartDefaultTask(void const* argument) { umain(); }
int32_t deviceId = 0;
static void board_init() {
switch (deviceId) {
case 10:

44
usrc/subboards/subboard80_cliptip/subboard80_cliptip.cpp

@ -66,28 +66,28 @@ void Subboard80Cliptip::initialize() {
input[1].initAsInput(MOTOR1_REFR, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, MOTOR1_REFR_MIRROR);
PipetteModuleV2::config_t cfg = {0};
PipetteModuleV2::create_default_cfg(&cfg);
cfg.motor_shaft = MOTOR1_MOTOR_SHAFT;
cfg.motor_one_circle_pulse = MOTOR1_MOTOR_ONE_CIRCLE_PULSE;
cfg.motor_one_circle_pulse_denominator = MOTOR1_MOTOR_ONE_CIRCLE_PULSE_DENOMINATOR;
cfg.motor_ihold = MOTOR1_STEPMOTOR_IHOLD;
cfg.motor_irun = MOTOR1_STEPMOTOR_IRUN;
cfg.motor_iholddelay = MOTOR1_STEPMOTOR_IHOLDDELAY;
cfg.motor_iglobalscaler = MOTOR1_STEPMOTOR_IGLOBALSCALER;
cfg.motor_default_velocity = MOTOR1_MOTOR_DEFAULT_VELOCITY;
cfg.motor_min_d = MOTOR1_MIN_D;
cfg.motor_max_d = MOTOR1_MAX_D;
cfg.motor_run_to_zero_speed = MOTOR1_MOTOR_RUN_TO_ZERO_SPEED;
cfg.motor_look_zero_edge_speed = MOTOR1_MOTOR_LOOK_ZERO_EDGE_SPEED;
cfg.motor_vstart = MOTOR1_MOTOR_VSTART;
cfg.motor_a1 = MOTOR1_MOTOR_A1;
cfg.motor_amax = MOTOR1_MOTOR_AMAX;
cfg.motor_v1 = MOTOR1_MOTOR_V1;
cfg.motor_dmax = MOTOR1_MOTOR_DMAX;
cfg.motor_d1 = MOTOR1_MOTOR_D1;
cfg.motor_vstop = MOTOR1_MOTOR_VSTOP;
cfg.motor_tzerowait = MOTOR1_MOTOR_TZEROWAIT;
cfg.motor_enc_resolution = MOTOR1_ENC_RESOLUTION;
cfg.motor_enable_enc = MOTOR1_ENABLE_ENC_RESOLUTION;
cfg.zm_shaft = MOTOR1_MOTOR_SHAFT;
cfg.zm_one_circle_pulse = MOTOR1_MOTOR_ONE_CIRCLE_PULSE;
cfg.zm_one_circle_pulse_denominator = MOTOR1_MOTOR_ONE_CIRCLE_PULSE_DENOMINATOR;
cfg.zm_ihold = MOTOR1_STEPMOTOR_IHOLD;
cfg.zm_irun = MOTOR1_STEPMOTOR_IRUN;
cfg.zm_iholddelay = MOTOR1_STEPMOTOR_IHOLDDELAY;
cfg.zm_iglobalscaler = MOTOR1_STEPMOTOR_IGLOBALSCALER;
cfg.zm_default_velocity = MOTOR1_MOTOR_DEFAULT_VELOCITY;
cfg.zm_min_d = MOTOR1_MIN_D;
cfg.zm_max_d = MOTOR1_MAX_D;
cfg.zm_run_to_zero_speed = MOTOR1_MOTOR_RUN_TO_ZERO_SPEED;
cfg.zm_look_zero_edge_speed = MOTOR1_MOTOR_LOOK_ZERO_EDGE_SPEED;
cfg.zm_vstart = MOTOR1_MOTOR_VSTART;
cfg.zm_a1 = MOTOR1_MOTOR_A1;
cfg.zm_amax = MOTOR1_MOTOR_AMAX;
cfg.zm_v1 = MOTOR1_MOTOR_V1;
cfg.zm_dmax = MOTOR1_MOTOR_DMAX;
cfg.zm_d1 = MOTOR1_MOTOR_D1;
cfg.zm_vstop = MOTOR1_MOTOR_VSTOP;
cfg.zm_tzerowait = MOTOR1_MOTOR_TZEROWAIT;
cfg.zm_enc_resolution = MOTOR1_ENC_RESOLUTION;
cfg.zm_enable_enc = MOTOR1_ENABLE_ENC_RESOLUTION;
//
cfg.limit_ul = 30;

Loading…
Cancel
Save