Merge branch 'fz-dev' into dev

This commit is contained in:
MX
2023-05-09 18:28:46 +03:00
84 changed files with 14814 additions and 1182 deletions

View File

@@ -19,6 +19,8 @@
/* Time, in ms, to wait for mode transition before crashing */
#define C2_MODE_SWITCH_TIMEOUT 10000
#define FURI_HAL_BT_HARDFAULT_INFO_MAGIC 0x1170FD0F
FuriMutex* furi_hal_bt_core2_mtx = NULL;
static FuriHalBtStack furi_hal_bt_stack = FuriHalBtStackUnknown;
@@ -440,3 +442,12 @@ bool furi_hal_bt_ensure_c2_mode(BleGlueC2Mode mode) {
FURI_LOG_E(TAG, "Failed to switch C2 mode: %d", fw_start_res);
return false;
}
const FuriHalBtHardfaultInfo* furi_hal_bt_get_hardfault_info() {
/* AN5289, 4.8.2 */
const FuriHalBtHardfaultInfo* info = (FuriHalBtHardfaultInfo*)(SRAM2A_BASE);
if(info->magic != FURI_HAL_BT_HARDFAULT_INFO_MAGIC) {
return NULL;
}
return info;
}

View File

@@ -27,7 +27,7 @@
#define FURI_HAL_FLASH_OPT_KEY2 0x4C5D6E7F
#define FURI_HAL_FLASH_OB_TOTAL_WORDS (0x80 / (sizeof(uint32_t) * 2))
/* lib/STM32CubeWB/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_RfWithFlash/Core/Src/flash_driver.c
/* STM32CubeWB/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_RfWithFlash/Core/Src/flash_driver.c
* ProcessSingleFlashOperation, quote:
> In most BLE application, the flash should not be blocked by the CPU2 longer than FLASH_TIMEOUT_VALUE (1000ms)
> However, it could be that for some marginal application, this time is longer.