Skip to content

Commit

Permalink
samples: drivers: configure the sample to run on stm32h573_dk
Browse files Browse the repository at this point in the history
Declare the stm32h573i_dk node to be MSPI compatible when running
the samples/drivers/jesd216 or samples/drivers/mspi/
Only SPI/STR mode.
No DMA in this version.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
  • Loading branch information
FRASTM committed Sep 13, 2024
1 parent 7b0f6e1 commit 533c0a2
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
4 changes: 4 additions & 0 deletions samples/drivers/mspi/mspi_flash/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ if(CONFIG_FLASH_MSPI_ATXP032)
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/zephyr/drivers)
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/drivers/mspi)
endif()
if(CONFIG_FLASH_STM32_MSPI)
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/zephyr/drivers)
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/drivers/mspi)
endif()
9 changes: 9 additions & 0 deletions samples/drivers/mspi/mspi_flash/boards/stm32h573i_dk.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2024 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0


CONFIG_LOG=y
CONFIG_FLASH_LOG_LEVEL_DBG=y
CONFIG_MSPI_LOG_LEVEL_DBG=y

CONFIG_FLASH_MSPI_NOR_MX=y
34 changes: 34 additions & 0 deletions samples/drivers/mspi/mspi_flash/boards/stm32h573i_dk.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2024 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
aliases {
flash0 = &mx25lm51245;
};
};

&mx25lm51245 {
/* First step : only SPI/STR supported */
/delete-property/ mspi-io-mode;
/delete-property/ mspi-data-rate;
mspi-io-mode = "MSPI_IO_MODE_SINGLE";
mspi-data-rate = "MSPI_DATA_RATE_SINGLE";
/delete-property/ read-command;
read-command = <0x13>; /* Fast read */
/delete-property/ address-length;
address-length = "ADDR_3_BYTE";
};

&mspi1 {
/* request 57 for xSPI1 */
dmas = <&gpdma1 4 57 STM32_DMA_PERIPH_TX
&gpdma1 5 57 STM32_DMA_PERIPH_RX>;
dma-names = "tx", "rx";
};

&gpdma1 {
status = "disabled";
};

0 comments on commit 533c0a2

Please sign in to comment.