aboutsummaryrefslogtreecommitdiff
path: root/platform/stm32f7xx/qspi.c
diff options
context:
space:
mode:
Diffstat (limited to 'platform/stm32f7xx/qspi.c')
-rw-r--r--platform/stm32f7xx/qspi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/stm32f7xx/qspi.c b/platform/stm32f7xx/qspi.c
index f2a92685..f5f51cc5 100644
--- a/platform/stm32f7xx/qspi.c
+++ b/platform/stm32f7xx/qspi.c
@@ -268,7 +268,7 @@ static ssize_t spiflash_bdev_read_block(struct bdev* device, void* buf,
QSPI_CommandTypeDef s_command;
HAL_StatusTypeDef status;
- uint64_t largest_offset = (block + count) * device->block_size;
+ uint64_t largest_offset = (block + count) * device->block_size - 1;
// /* Initialize the read command */
s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE;