Skip to content

Commit

Permalink
drivers: flash : stm32: STM32L4P5xx fix page calculation from offset
Browse files Browse the repository at this point in the history
This fix adds the STM32L4P5xx to the list of devices that have an
offset-to-page shift calculation of 12 bits. Previously, the driver
would only shift the offset by 11 bits when calculating the page to
erase.

This would prevent the driver from erasing the correct page.

Signed-off-by: George Beckstein <[email protected]>
  • Loading branch information
gdb3-ampaworks authored and carlescufi committed Jan 4, 2024
1 parent 0ed8f10 commit 603c3af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/flash/flash_stm32l4x.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ LOG_MODULE_REGISTER(LOG_DOMAIN);

#if !defined(STM32L4R5xx) && !defined(STM32L4R7xx) && !defined(STM32L4R9xx) && \
!defined(STM32L4S5xx) && !defined(STM32L4S7xx) && !defined(STM32L4S9xx) && \
!defined(STM32L4Q5xx)
!defined(STM32L4Q5xx) && !defined(STM32L4P5xx)
#define STM32L4X_PAGE_SHIFT 11
#else
#define STM32L4X_PAGE_SHIFT 12
Expand Down

0 comments on commit 603c3af

Please sign in to comment.