Автоопределение JTAG
This commit is contained in:
parent
fd5951a6e5
commit
3651bb6161
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue