fix block alignment bug also in dfu_sd_image_validate
This commit is contained in:
parent
fb847b942e
commit
90e3149050
@ -790,6 +790,9 @@ uint32_t dfu_sd_image_validate(void)
|
|||||||
uint32_t image_end = bootloader_settings.sd_image_start +
|
uint32_t image_end = bootloader_settings.sd_image_start +
|
||||||
bootloader_settings.sd_image_size;
|
bootloader_settings.sd_image_size;
|
||||||
|
|
||||||
|
/* ##### FIX START ##### */
|
||||||
|
block_size &= ~(uint32_t)(CODE_PAGE_SIZE - 1);
|
||||||
|
/* ##### FIX END ##### */
|
||||||
uint32_t img_block_start = bootloader_settings.sd_image_start + 2 * block_size;
|
uint32_t img_block_start = bootloader_settings.sd_image_start + 2 * block_size;
|
||||||
uint32_t sd_block_start = sd_start + 2 * block_size;
|
uint32_t sd_block_start = sd_start + 2 * block_size;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user