cortexm/detach: Add a dummy transaction after cleaning DHCSR.

This replaces the seemingly superflous swdptap_seq_out() at
the end of adiv5_swdp_low_access() needed to continue after detach.
This commit is contained in:
Uwe Bonnes 2018-07-18 23:20:26 +02:00
parent 7908ba526b
commit 139707c5c0
1 changed files with 2 additions and 0 deletions

View File

@ -413,6 +413,8 @@ void cortexm_detach(target *t)
/* Disable debug */
target_mem_write32(t, CORTEXM_DHCSR, CORTEXM_DHCSR_DBGKEY);
/* Add some clock cycles to get the CPU running again.*/
target_mem_read32(t, 0);
}
enum { DB_DHCSR, DB_DCRSR, DB_DCRDR, DB_DEMCR };