cortexm: detach still needs extra cycles.

This commit is contained in:
Uwe Bonnes 2018-09-08 21:44:43 +02:00 committed by Gareth McMullin
parent 14bedcc441
commit cde7726b87
1 changed files with 2 additions and 0 deletions

View File

@ -414,6 +414,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 };