Skip to content

Commit 7be99f5

Browse files
authored
Merge pull request #702 from NXPmicro/MXRT1050_Issue_Hardware_Reset
MXRT1050: Issue a hardware reset
2 parents 300c820 + 08082a5 commit 7be99f5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

source/family/freescale/target_reset_mimxrt.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,18 @@
2222
#include "swd_host.h"
2323
#include "info.h"
2424
#include "target_family.h"
25+
#include "cmsis_os2.h"
2526

2627
static void target_before_init_debug(void)
2728
{
2829
// This is for the hardware conflict (the EVK are not consider >2 debugger connection
29-
// situation) with another external debugger(such as JLINK). Before drag&pull, to force
30-
// RESET pin to high state ensure a successfully access. If external debugger not
31-
// connected. It's not necessary for doing that.
30+
// situation) with another external debugger(such as JLINK). Before drag&pull, issue a
31+
// hardware reset to bring the platform to a known state and also force
32+
// RESET pin to high state ensure a successfully access.
33+
swd_set_target_reset(1);
34+
osDelay(5);
3235
swd_set_target_reset(0);
36+
osDelay(5);
3337
}
3438

3539
static void prerun_target_config(void)

0 commit comments

Comments
 (0)