SWD: Remove excessive line resets.
This commit is contained in:
parent
e7e1bfdb53
commit
5dafc0828c
|
@ -195,9 +195,8 @@ uint32_t firmware_swdp_read(ADIv5_DP_t *dp, uint16_t addr)
|
||||||
|
|
||||||
uint32_t firmware_swdp_error(ADIv5_DP_t *dp)
|
uint32_t firmware_swdp_error(ADIv5_DP_t *dp)
|
||||||
{
|
{
|
||||||
uint32_t err, clr = 0;
|
if ((dp->fault && (dp->idcode & ADIV5_DP_VERSION_MASK) == ADIV5_DPv2) &&
|
||||||
|
dp->dp_low_write) {
|
||||||
if ((dp->idcode & ADIV5_DP_VERSION_MASK) == ADIV5_DPv2) {
|
|
||||||
/* On protocoll error target gets deselected.
|
/* On protocoll error target gets deselected.
|
||||||
* With DP Change, another target needs selection.
|
* With DP Change, another target needs selection.
|
||||||
* => Reselect with right target! */
|
* => Reselect with right target! */
|
||||||
|
@ -206,6 +205,7 @@ uint32_t firmware_swdp_read(ADIv5_DP_t *dp, uint16_t addr)
|
||||||
uint32_t dummy;
|
uint32_t dummy;
|
||||||
dp->dp_low_read(dp, ADIV5_DP_IDCODE, &dummy);
|
dp->dp_low_read(dp, ADIV5_DP_IDCODE, &dummy);
|
||||||
}
|
}
|
||||||
|
uint32_t err, clr = 0;
|
||||||
err = adiv5_dp_read(dp, ADIV5_DP_CTRLSTAT) &
|
err = adiv5_dp_read(dp, ADIV5_DP_CTRLSTAT) &
|
||||||
(ADIV5_DP_CTRLSTAT_STICKYORUN | ADIV5_DP_CTRLSTAT_STICKYCMP |
|
(ADIV5_DP_CTRLSTAT_STICKYORUN | ADIV5_DP_CTRLSTAT_STICKYCMP |
|
||||||
ADIV5_DP_CTRLSTAT_STICKYERR | ADIV5_DP_CTRLSTAT_WDATAERR);
|
ADIV5_DP_CTRLSTAT_STICKYERR | ADIV5_DP_CTRLSTAT_WDATAERR);
|
||||||
|
|
|
@ -478,6 +478,9 @@ bool cortexm_probe(ADIv5_AP_t *ap)
|
||||||
|
|
||||||
bool cortexm_attach(target *t)
|
bool cortexm_attach(target *t)
|
||||||
{
|
{
|
||||||
|
ADIv5_AP_t *ap = cortexm_ap(t);
|
||||||
|
ap->dp->fault = 1; /* Force switch to this multi-drop device*/
|
||||||
|
target_check_error(t);
|
||||||
struct cortexm_priv *priv = t->priv;
|
struct cortexm_priv *priv = t->priv;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
uint32_t r;
|
uint32_t r;
|
||||||
|
|
Loading…
Reference in New Issue