Add a bunch of stuff: Add baudrate reconfig command to shell and move the uart to separate C file

This commit is contained in:
2021-11-27 17:41:11 +01:00
parent 6b9b7d78a0
commit 96e0931c9f
13 changed files with 274 additions and 76 deletions

View File

@@ -67,6 +67,13 @@ int watchdog_setup(uint8_t prescaler)
else
prescaler_reg_val = 6UL;
/** - (De)activate the watchdog during debug access according to @ref WATCHDOG_HALT_DEBUG */
if (WATCHDOG_HALT_DEBUG) {
DBGMCU->APB1FZ |= DBGMCU_APB1_FZ_DBG_IWDG_STOP;
} else {
DBGMCU->APB1FZ &= ~DBGMCU_APB1_FZ_DBG_IWDG_STOP;
}
/** - Unlock registers */
IWDG->KR = STM32_WATCHDOG_REGISTER_ACCESS_KEY;