Skip to content
Snippets Groups Projects
Commit 7d2ad65c authored by Tomas Vanek's avatar Tomas Vanek Committed by Andreas Fritiofson
Browse files

flash at91samd, at91sam4l: fix improper use of mem_ap_ call


Since merge of #3149 OpenOCD start with an unresponsive SAMD or SAM4L
resulted in segfaults. First was in cortex_m_assert_reset
(fixed by #3552), second was in samd_handle_reset_deassert()
/sam4l_handle_reset_deassert().

The change replaces mem_ap_write_u32/8 by target_write_u32/8.
It also takes better care about examining and polling target before
debug control registers are set. It prevents lockup when 'reset halt'
is issued on unresponsive cpu.

Change-Id: I2516489f4771aebfc1118d174f527497b8a201ad
Signed-off-by: default avatarTomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/3603


Tested-by: jenkins
Reviewed-by: default avatarAndreas Fritiofson <andreas.fritiofson@gmail.com>
parent 607edefb
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment