🐛 Fix boot / SD for STM32 (F103Rx) boards (#22087)

This commit is contained in:
Victor Oliveira
2021-06-11 18:13:22 -03:00
committed by GitHub
parent c2f67cf8ee
commit 221bec5ce8
3 changed files with 11 additions and 0 deletions

View File

@@ -1126,6 +1126,7 @@ void setup() {
#endif
#if HAS_FREEZE_PIN
SETUP_LOG("FREEZE_PIN");
SET_INPUT_PULLUP(FREEZE_PIN);
#endif
@@ -1134,11 +1135,19 @@ void setup() {
OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
#endif
#ifdef JTAGSWD_RESET
SETUP_LOG("JTAGSWD_RESET");
JTAGSWD_RESET();
#endif
#if EITHER(DISABLE_DEBUG, DISABLE_JTAG)
delay(10);
// Disable any hardware debug to free up pins for IO
#if ENABLED(DISABLE_DEBUG) && defined(JTAGSWD_DISABLE)
SETUP_LOG("JTAGSWD_DISABLE");
JTAGSWD_DISABLE();
#elif defined(JTAG_DISABLE)
SETUP_LOG("JTAG_DISABLE");
JTAG_DISABLE();
#else
#error "DISABLE_(DEBUG|JTAG) is not supported for the selected MCU/Board."