[FL-1558] Technical Debt: console, bootloader, targets, stdglue, etc... (#590)

* ApiHal: console abstraction, change uart baud rate to 230400. Bootloader: drop F5. Furi: prevent thread local output to serial console in stdglue.
* ApiHal: take control over system initialization, reorder some subsystems in a hope of fixing USB issues.
* Main: cleanup dead code. ISR: take care of HSECSS by our self. USB: leave clock configuration alone.
* F6 cube: switch RCC to LL.
* Cli: rollback return behavior.
This commit is contained in:
あく
2021-07-20 20:14:42 +03:00
committed by GitHub
parent 0dc4081b85
commit f25d000d53
36 changed files with 988 additions and 1757 deletions

View File

@@ -17,7 +17,10 @@ extern void HW_IPCC_Tx_Handler();
extern void HW_IPCC_Rx_Handler();
void NMI_Handler(void) {
HAL_RCC_NMI_IRQHandler();
if (LL_RCC_IsActiveFlag_HSECSS()) {
LL_RCC_ClearFlag_HSECSS();
NVIC_SystemReset();
}
}
void HardFault_Handler(void) {
@@ -50,11 +53,14 @@ void SysTick_Handler(void) {
}
void TAMP_STAMP_LSECSS_IRQHandler(void) {
if (!LL_RCC_LSE_IsReady()) {
// TODO: notify user about issue with LSE
LL_RCC_ForceBackupDomainReset();
LL_RCC_ReleaseBackupDomainReset();
NVIC_SystemReset();
if (LL_RCC_IsActiveFlag_LSECSS()) {
LL_RCC_ClearFlag_LSECSS();
if (!LL_RCC_LSE_IsReady()) {
// TODO: notify user about issue with LSE
LL_RCC_ForceBackupDomainReset();
LL_RCC_ReleaseBackupDomainReset();
NVIC_SystemReset();
}
}
}