From e4fa411ae97c595d7d71c6b7bf9e8ea5fa2bf488 Mon Sep 17 00:00:00 2001 From: dxl <64101226@qq.com> Date: Sun, 2 Aug 2026 00:23:58 +0800 Subject: [PATCH] Run ConfigSystemClocks() & UnitTestMain() in start.c --- armsrc/start.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/armsrc/start.c b/armsrc/start.c index a5e385ae7..63bddd7c7 100644 --- a/armsrc/start.c +++ b/armsrc/start.c @@ -80,6 +80,13 @@ void Vector(void) { uint32_t *bss_dst = __bss_start__; while (bss_dst < __bss_end__) *bss_dst++ = 0; + // For some platforms (such as AT32), it is best to init the system clock after jump to app, + // otherwise the USB may not work. + // Because after jumping from boot to app, some variables in RAM will be lost. + ConfigSystemClocks(); + // Run the unit test(If enable) + UnitTestMain(); + // Run App main loop AppMain(); } #endif