aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hc32f460/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/hc32f460/main.c b/src/hc32f460/main.c
index a641667f..0dc3ebc5 100644
--- a/src/hc32f460/main.c
+++ b/src/hc32f460/main.c
@@ -7,6 +7,7 @@
#include "autoconf.h" // CONFIG_MACH_AVR
#include "sched.h"
#include "system_hc32f460.h"
+#include "hc32f460_gpio.h"
/****************************************************************
@@ -20,6 +21,11 @@ armcm_main(void)
// sets the system clock speed variable for library use
SystemInit();
+ // disable JTAG/SWD on pins PA13, PA14, PA15, PB3, PB4
+ // SWD still works until the relevant pins are reconfigured. Proprietary
+ // flash program (XHSC ISP) must be used to reflash afterwards.
+ PORT_DebugPortSetting(ALL_DBG_PIN, Disable);
+
// manage the system
sched_main();