cmsis-dap: Handle ADI DP22 devices on probes not multidrop capable.
This commit is contained in:
parent
923edc7f7e
commit
f9414d5826
|
@ -426,6 +426,8 @@ int dap_swdptap_init(ADIv5_DP_t *dp)
|
||||||
/* DAP_SWD_SEQUENCE does not do auto turnaround, use own!*/
|
/* DAP_SWD_SEQUENCE does not do auto turnaround, use own!*/
|
||||||
dp->dp_low_read = dap_dp_low_read;
|
dp->dp_low_read = dap_dp_low_read;
|
||||||
dp->dp_low_write = dap_dp_low_write;
|
dp->dp_low_write = dap_dp_low_write;
|
||||||
|
} else {
|
||||||
|
dp->error = dap_dp_error;
|
||||||
}
|
}
|
||||||
dp->seq_out = dap_swdptap_seq_out;
|
dp->seq_out = dap_swdptap_seq_out;
|
||||||
dp->seq_out_parity = dap_swdptap_seq_out_parity;
|
dp->seq_out_parity = dap_swdptap_seq_out_parity;
|
||||||
|
|
|
@ -121,8 +121,6 @@ int platform_adiv5_swdp_scan(uint32_t targetid)
|
||||||
{
|
{
|
||||||
info.is_jtag = false;
|
info.is_jtag = false;
|
||||||
platform_max_frequency_set(cl_opts.opt_max_swj_frequency);
|
platform_max_frequency_set(cl_opts.opt_max_swj_frequency);
|
||||||
if (targetid && (info.bmp_type != BMP_TYPE_BMP))
|
|
||||||
DEBUG_WARN("Ignoring TARGETID for now!\n");
|
|
||||||
switch (info.bmp_type) {
|
switch (info.bmp_type) {
|
||||||
case BMP_TYPE_BMP:
|
case BMP_TYPE_BMP:
|
||||||
case BMP_TYPE_LIBFTDI:
|
case BMP_TYPE_LIBFTDI:
|
||||||
|
|
|
@ -108,8 +108,9 @@ int adiv5_swdp_scan(uint32_t targetid)
|
||||||
uint32_t idcode = 0;
|
uint32_t idcode = 0;
|
||||||
volatile uint32_t target_id;
|
volatile uint32_t target_id;
|
||||||
bool is_v2 = true;
|
bool is_v2 = true;
|
||||||
if (!targetid) {
|
if (!targetid || (initial_dp->error != firmware_swdp_error)) {
|
||||||
/* Try to read ID */
|
/* No targetID given on the command line or probe can not
|
||||||
|
* handle multi-drop. Try to read ID */
|
||||||
dp_line_reset(initial_dp);
|
dp_line_reset(initial_dp);
|
||||||
volatile struct exception e;
|
volatile struct exception e;
|
||||||
TRY_CATCH (e, EXCEPTION_ALL) {
|
TRY_CATCH (e, EXCEPTION_ALL) {
|
||||||
|
@ -147,9 +148,11 @@ int adiv5_swdp_scan(uint32_t targetid)
|
||||||
adiv5_dp_write(initial_dp, ADIV5_DP_CTRLSTAT, 0);
|
adiv5_dp_write(initial_dp, ADIV5_DP_CTRLSTAT, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!initial_dp->dp_low_read)
|
if (initial_dp->error != firmware_swdp_error) {
|
||||||
/* E.g. CMSIS_DAP < V1.2 can not handle multu-drop!*/
|
DEBUG_WARN("CMSIS_DAP < V1.2 can not handle multi-drop!\n");
|
||||||
|
/* E.g. CMSIS_DAP < V1.2 can not handle multi-drop!*/
|
||||||
is_v2 = false;
|
is_v2 = false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
is_v2 = false;
|
is_v2 = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue