2
0
forked from Ivasoft/DSView

fix stop error on DSCope

This commit is contained in:
DreamSourceLab
2023-09-21 20:10:10 -07:00
parent 8e83526e47
commit 60b446eb80
3 changed files with 15 additions and 4 deletions

View File

@@ -55,6 +55,7 @@
#define COMB_ADDR 0x68
#define EI2C_ADDR 0x60
#define ADCC_ADDR 0x48
#define HW_STATUS_ADDR 0x05
#define HDL_VERSION_ADDR 0x04
#define bmSECU_READY (1 << 3)

View File

@@ -2115,11 +2115,7 @@ static int dev_acquisition_start(struct sr_dev_inst *sdi, void *cb_data)
static int dev_acquisition_stop(const struct sr_dev_inst *sdi, void *cb_data)
{
struct DSL_context *devc = sdi->priv;
int ret = dsl_dev_acquisition_stop(sdi, cb_data);
if (devc->profile->dev_caps.feature_caps & CAPS_FEATURE_HMCAD1511) {
dsl_config_adc(sdi, adc_power_down);
}
return ret;
}

View File

@@ -2025,6 +2025,20 @@ SR_PRIV int dsl_dev_acquisition_stop(const struct sr_dev_inst *sdi, void *cb_dat
sr_err("%s: Sent acquisition stop command failed!", __func__);
else
sr_info("%s: Sent acquisition stop command!", __func__);
/* check a real stop of FPGA status*/
uint8_t hw_status = 1;
while (hw_status != 0) {
if (dsl_rd_reg(sdi, HW_STATUS_ADDR, &hw_status) != SR_OK)
sr_err("%s: Get hardware status command failed!", __func__);
else
sr_info("%s: Get hardware status command!", __func__);
}
/* adc power down*/
if (devc->profile->dev_caps.feature_caps & CAPS_FEATURE_HMCAD1511) {
dsl_config_adc(sdi, adc_power_down);
}
}
return SR_OK;