From 2b33467a6138adb0a7c4b6f746f7a7ac36a6b770 Mon Sep 17 00:00:00 2001 From: "Peter A. Bigot" Date: Sat, 18 Apr 2020 22:23:01 -0500 Subject: [PATCH] disk: disk_access_flash: align buffer Flash drivers may impose alignment requirements on the destination buffers due to use of DMA transfers. In particular Nordic QSPI flash API requires that addresses, sizes, and buffers all be 4-byte aligned. Align the ready/copy buffer to satisfy this requirement. Signed-off-by: Peter A. Bigot --- subsys/disk/disk_access_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/disk/disk_access_flash.c b/subsys/disk/disk_access_flash.c index 026d1e91a78..d58c7a8e9db 100644 --- a/subsys/disk/disk_access_flash.c +++ b/subsys/disk/disk_access_flash.c @@ -19,7 +19,7 @@ static struct device *flash_dev; /* flash read-copy-erase-write operation */ -static u8_t read_copy_buf[CONFIG_DISK_ERASE_BLOCK_SIZE]; +static u8_t __aligned(4) read_copy_buf[CONFIG_DISK_ERASE_BLOCK_SIZE]; static u8_t *fs_buff = read_copy_buf; /* calculate number of blocks required for a given size */