aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorGurjant Kalsi <me@gurjantkalsi.com>2015-11-11 17:31:14 -0800
committerGurjant Kalsi <me@gurjantkalsi.com>2015-11-11 17:31:14 -0800
commit01ea7bc7a3184006d69c317309a1de54d59b9d73 (patch)
treec2b4cfdfac9ee58362d65ba9b93ded01468a266d /platform
parente9ee76ef13453afc9fdb3551ee11ffc5bace100f (diff)
downloadcommon-01ea7bc7a3184006d69c317309a1de54d59b9d73.tar.gz
[qspi][stm32f7xx][spiflash] Fix the logic for reading pages on the boundary between 24bit addrs and 32bit addrs.
Diffstat (limited to 'platform')
-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;