Skip to content

Commit 9fbe27b

Browse files
FRASTMfabiobaltieri
authored andcommitted
drivers: flash: ospi for stm32 mcu
Fixes command configuration to have samples/drivers/spi_flash passed on stm32l562 and stm32u585 disco kits. In OctoSPI STR/DTR and SPI/STR modes, to determine the address_width, checking the jesd216_bfp_addrbytes on JESD216_SFDP_BFP_DW1_ADDRBYTES_VAL_3B4B or _VAL_4B. Signed-off-by: Francois Ramu <[email protected]>
1 parent 8f93051 commit 9fbe27b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/flash/flash_stm32_ospi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,8 @@ static void spi_nor_process_bfp_addrbytes(const struct device *dev,
14921492
{
14931493
struct flash_stm32_ospi_data *data = dev->data;
14941494

1495-
if (jesd216_bfp_addrbytes == JESD216_SFDP_BFP_DW1_ADDRBYTES_VAL_4B) {
1495+
if ((jesd216_bfp_addrbytes == JESD216_SFDP_BFP_DW1_ADDRBYTES_VAL_4B) ||
1496+
(jesd216_bfp_addrbytes == JESD216_SFDP_BFP_DW1_ADDRBYTES_VAL_3B4B)) {
14961497
data->address_width = 4U;
14971498
} else {
14981499
data->address_width = 3U;

0 commit comments

Comments
 (0)