Автоопределение JTAG

This commit is contained in:
cfif 2026-07-03 11:14:00 +03:00
parent fd5951a6e5
commit 3651bb6161
1 changed files with 2 additions and 5 deletions

View File

@ -108,17 +108,14 @@ static void Boot2App(void) {
}
static bool is_jtag_debug_active(void) {
// Проверяем, включена ли отладка
return (CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) != 0;
}
#define CHECK_JTAG_DEBUG_ACTIVE ((CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) != 0)
uint64_t NumberBank = 0;
int main(void) {
Bsp_CLOCK_Init();
if (is_jtag_debug_active()) {
if (CHECK_JTAG_DEBUG_ACTIVE) {
D_bInternalFlashPage_Clear(0x04000000, NULL, NULL);
}