Skip to content

Commit 90e3149

Browse files
authored
fix block alignment bug also in dfu_sd_image_validate
1 parent fb847b9 commit 90e3149

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/sdk11/components/libraries/bootloader_dfu/dfu_single_bank.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,9 @@ uint32_t dfu_sd_image_validate(void)
790790
uint32_t image_end = bootloader_settings.sd_image_start +
791791
bootloader_settings.sd_image_size;
792792

793+
/* ##### FIX START ##### */
794+
block_size &= ~(uint32_t)(CODE_PAGE_SIZE - 1);
795+
/* ##### FIX END ##### */
793796
uint32_t img_block_start = bootloader_settings.sd_image_start + 2 * block_size;
794797
uint32_t sd_block_start = sd_start + 2 * block_size;
795798

0 commit comments

Comments
 (0)