if (o.devname != NULL) /* stlinkv1 */
{
sl = stlink_v1_open(50);
- sl->verbose = 50;
if (sl == NULL) goto on_error;
+ sl->verbose = 50;
}
else /* stlinkv2 */
{
sl = stlink_open_usb(50);
- sl->verbose = 50;
if (sl == NULL) goto on_error;
+ sl->verbose = 50;
}
if (stlink_current_mode(sl) == STLINK_DEV_DFU_MODE)
stlink_enter_swd_mode(sl);
stlink_reset(sl);
+ stlink_load_device_params(sl);
if (o.do_read == 0) /* write */
{