diff options
author | Adam Malinowski <a.malinowsk2@partner.samsung.com> | 2020-02-17 17:20:18 +0100 |
---|---|---|
committer | Adam Malinowski <a.malinowsk2@partner.samsung.com> | 2020-02-17 17:20:18 +0100 |
commit | 9dd189d973da64e033a0c5c2adb3d94b23153d94 (patch) | |
tree | 650b89ae64c6880d3efc6b8c848fbe4ac24484a4 | |
parent | 204f4f2e7e02addabe2e221b3b6c7bb91997e2a2 (diff) | |
download | sd-mux-master.tar.gz sd-mux-master.tar.bz2 sd-mux-master.zip |
USB SSD drives seem to have big enough capacitors to
keep them powered for more than 100ms. This change
increase the power off time to 500ms to let them discharge
and reset the drive properly.
Change-Id: I5e1f647d3d6ce72881bd628de7ef23255ea844ff
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9224422..2cfda4d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -46,6 +46,7 @@ #define DELAY_100MS 100000 +#define DELAY_500MS 500000 #define CCDT_SDMUX_STR "sd-mux" #define CCDT_SDWIRE_STR "sd-wire" @@ -505,7 +506,7 @@ int selectTarget(Target target, CCOptionValue options[]) { if (target == T_DUT) { pinState &= ~UM_DEVICE_PWR; ret |= ftdi_set_bitmode(ftdi, pinState, BITMODE_CBUS); - usleep(DELAY_100MS); + usleep(DELAY_500MS); pinState |= UM_DEVICE_PWR; ret |= ftdi_set_bitmode(ftdi, pinState, BITMODE_CBUS); usleep(DELAY_100MS); @@ -517,7 +518,7 @@ int selectTarget(Target target, CCOptionValue options[]) { pinState &= ~UM_DUT_LED; pinState &= ~UM_DEVICE_PWR; ret |= ftdi_set_bitmode(ftdi, pinState, BITMODE_CBUS); - usleep(DELAY_100MS); + usleep(DELAY_500MS); pinState |= UM_DEVICE_PWR; ret |= ftdi_set_bitmode(ftdi, pinState, BITMODE_CBUS); usleep(DELAY_100MS); |