From 3cd89eab2717b7ea4bbfac06743aff099040052c Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Tue, 2 Apr 2024 23:42:32 +0100 Subject: [PATCH] (Experimental) Higher C2 timeout for LFS writes --- targets/f7/furi_hal/furi_hal_flash.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/targets/f7/furi_hal/furi_hal_flash.c b/targets/f7/furi_hal/furi_hal_flash.c index 138e07eab..63932ac61 100644 --- a/targets/f7/furi_hal/furi_hal_flash.c +++ b/targets/f7/furi_hal/furi_hal_flash.c @@ -41,7 +41,11 @@ > If for any reason this test is never passed, this means there is a failure in the system and there is no other > way to recover than applying a device reset. */ -#define FURI_HAL_FLASH_C2_LOCK_TIMEOUT_MS (3000U) /* 3 seconds */ +// Was previously 3000U, 3 seconds +// Changing furi_assert() to furi_check() brought timeout crashes +// Internal storage is very slow, and "big" files will often cause a "timeout" with 3 seconds +// 10 seconds seems fine, the file operations complete successfully, albeit slowly +#define FURI_HAL_FLASH_C2_LOCK_TIMEOUT_MS (10000U) /* 10 seconds */ #define IS_ADDR_ALIGNED_64BITS(__VALUE__) (((__VALUE__) & 0x7U) == (0x00UL)) #define IS_FLASH_PROGRAM_ADDRESS(__VALUE__) \