Skip to content

Commit 580ae2e

Browse files
authored
Merge pull request #71 from fanoush/patch-1
fix for issue #70
2 parents fb847b9 + 4ce961f commit 580ae2e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-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

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)