This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit a09610139bafc095312a6e194f4137a50cc58e5f
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Wed Jun 26 12:53:17 2024 +0200

    sys/log_fcb: Relax write alignment restriction
    
    Code was limiting usage of FCB and FCB2 to flashes
    with at most 8 bytes write alignment.
    There was no actual reason to have this limitation
    and now log can be used with STM32H7 and STM32U5 boards
    that have alignment 16 or 32 bytes.
    
    Signed-off-by: Jerzy Kasenberg <[email protected]>
---
 sys/log/full/src/log_fcb.c  | 4 ++--
 sys/log/full/src/log_fcb2.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/log/full/src/log_fcb.c b/sys/log/full/src/log_fcb.c
index 5f4df8e31..82bd1a415 100644
--- a/sys/log/full/src/log_fcb.c
+++ b/sys/log/full/src/log_fcb.c
@@ -27,8 +27,8 @@
 #include "fcb/fcb.h"
 #include "log/log.h"
 
-/* Assume the flash alignment requirement is no stricter than 8. */
-#define LOG_FCB_MAX_ALIGN   8
+/* Assume the flash alignment requirement is no stricter than 32. */
+#define LOG_FCB_MAX_ALIGN   32
 
 static int log_fcb_rtr_erase(struct log *log);
 
diff --git a/sys/log/full/src/log_fcb2.c b/sys/log/full/src/log_fcb2.c
index c8a5d07b2..826150a12 100644
--- a/sys/log/full/src/log_fcb2.c
+++ b/sys/log/full/src/log_fcb2.c
@@ -27,8 +27,8 @@
 #include "log/log.h"
 #include "fcb/fcb2.h"
 
-/* Assume the flash alignment requirement is no stricter than 8. */
-#define LOG_FCB2_MAX_ALIGN   8
+/* Assume the flash alignment requirement is no stricter than 32. */
+#define LOG_FCB2_MAX_ALIGN   32
 
 static int log_fcb2_rtr_erase(struct log *log);
 

Reply via email to