Previously when running the program, reading the chip version
would fail. Running the program a second time worked. This
sequence is repeated the next time st-flash/st-util is run.
Giving reset 10ms to complete before trying to read the chip
version resolves the issue.
Signed-off-by: Greg Meiste <w30289@motorola.com>
#include <sys/types.h>
#include <libusb.h>
#include <errno.h>
+#include <unistd.h>
#include "stlink-common.h"
#include "stlink-usb.h"
if (reset) {
stlink_reset(sl);
+ usleep(10000);
}
stlink_version(sl);
error = stlink_load_device_params(sl);