Skip to content

Commit 4ce961f

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

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,9 @@ uint32_t dfu_sd_image_validate(void)
817817
uint32_t image_end = bootloader_settings.sd_image_start +
818818
bootloader_settings.sd_image_size;
819819

820+
/* ##### FIX START ##### */
821+
block_size &= ~(uint32_t)(CODE_PAGE_SIZE - 1);
822+
/* ##### FIX END ##### */
820823
uint32_t img_block_start = bootloader_settings.sd_image_start + 2 * block_size;
821824
uint32_t sd_block_start = sd_start + 2 * block_size;
822825

0 commit comments

Comments
 (0)