From ee725e07f17ebd425579e6974a9133a3128a82de Mon Sep 17 00:00:00 2001 From: andy <1414772332@qq.com> Date: Thu, 6 Feb 2025 11:02:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=8Asbl=20common.c=E4=B8=AD=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=AF=84=E5=AD=98=E5=99=A8=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0hw=E7=9B=AE=E5=BD=95=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sbl/inc/sbl_boot.h | 3 +++ sbl/src/common.c | 4 ++-- sbl/src/hw/sbl_boot.c | 5 +++++ sbl/src/hw2/sbl_boot.c | 4 ++++ sbl/src/hw3/sbl_boot.c | 4 ++++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/sbl/inc/sbl_boot.h b/sbl/inc/sbl_boot.h index 6a8ef2f..10c17a4 100644 --- a/sbl/inc/sbl_boot.h +++ b/sbl/inc/sbl_boot.h @@ -104,6 +104,9 @@ uint32_t sbl_load_next_firmware(uint32_t *run_addr, uint32_t sbl_jump_next_firmware(uint32_t run_addr, int mode, int print_eb, int flash_size, int psram_eb); +// kl1会操作一下tms引脚,这个操作对kl2和kl3应该是无效的 +void sbl_tms_interrupt_disable(); + #ifdef __cplusplus } #endif diff --git a/sbl/src/common.c b/sbl/src/common.c index 296df49..d04958a 100644 --- a/sbl/src/common.c +++ b/sbl/src/common.c @@ -749,7 +749,7 @@ int run_boot_delay() char *p = console_buffer; int n = 0; /* buffer index */ int plen = 0; /* prompt length */ - int col; /* output column cnt */ + int col = 0; /* output column cnt */ char c; int8_t pk; int i = 0; @@ -983,7 +983,7 @@ void sbl_main_loop(void) int auto_start = 0; auto_start = run_boot_delay(); - REG32(0x44007010) = 0x80; + sbl_tms_interrupt_disable(); /* auto run */ if (auto_start) { diff --git a/sbl/src/hw/sbl_boot.c b/sbl/src/hw/sbl_boot.c index 618b011..9a6585a 100644 --- a/sbl/src/hw/sbl_boot.c +++ b/sbl/src/hw/sbl_boot.c @@ -468,3 +468,8 @@ uint32_t sbl_jump_next_firmware(uint32_t run_addr, return 0; } +// kl1会操作一下tms引脚,这个操作对kl2和kl3应该是无效的 +void sbl_tms_interrupt_disable() +{ + REG32(0x44007010) = 0x80; +} \ No newline at end of file diff --git a/sbl/src/hw2/sbl_boot.c b/sbl/src/hw2/sbl_boot.c index 3402008..35e5a0f 100644 --- a/sbl/src/hw2/sbl_boot.c +++ b/sbl/src/hw2/sbl_boot.c @@ -467,3 +467,7 @@ uint32_t sbl_jump_next_firmware(uint32_t run_addr, return 0; } +// kl1会操作一下tms引脚,这个操作对kl2和kl3应该是无效的 +void sbl_tms_interrupt_disable() +{ +} \ No newline at end of file diff --git a/sbl/src/hw3/sbl_boot.c b/sbl/src/hw3/sbl_boot.c index 2be2cb0..fdfc7fd 100755 --- a/sbl/src/hw3/sbl_boot.c +++ b/sbl/src/hw3/sbl_boot.c @@ -528,3 +528,7 @@ uint32_t sbl_jump_next_firmware(uint32_t run_addr, return 0; } +// kl1会操作一下tms引脚,这个操作对kl2和kl3应该是无效的 +void sbl_tms_interrupt_disable() +{ +} \ No newline at end of file