2025-10-09 6:07 AM
I have been attempting to interface a STM32U575 mcu to a dual HYPERRAM/Flash memory set up in multiplexed mode as shown in the following image taken from the STM32 Octo-SPI AN5050 application note.
I am trying to implement a POSIX based RTOS and have thus been trying to create this setup in my project devicetree as follows:
&octospi2 {
pinctrl-0 = <&octospi_pins>;
pinctrl-names = "default";
status="okay";
flash: ospi-nor-flash@0 {
compatible = "st,stm32-ospi-nor";
reg = <0>;
size = <DT_SIZE_M(512)>;
ospi-max-frequency = <DT_FREQ_M(50)>;
spi-bus-width = <OSPI_OPI_MODE>;
data-rate = <OSPI_STR_TRANSFER>;
status = "okay";
};
hram: ospi-nor-flash@1 {
compatible = "st,stm32-ospi-nor";
reg = <1>;
size = <DT_SIZE_M(512)>;
ospi-max-frequency = <DT_FREQ_M(50)>;
spi-bus-width = <OSPI_OPI_MODE>;
data-rate = <OSPI_DTR_TRANSFER>;
status = "okay";
};
};
and I have also tried:
&octospi2 {
pinctrl-0 = <&octospi2_pins>;
pinctrl-names = "default";
status="okay";
flash: ospi-nor-flash@0 {
compatible = "st,stm32-ospi-nor";
reg = <0>;
size = <DT_SIZE_M(512)>;
ospi-max-frequency = <DT_FREQ_M(50)>;
spi-bus-width = <OSPI_OPI_MODE>;
data-rate = <OSPI_STR_TRANSFER>;
status = "okay";
};
};
&octospi1 {
pinctrl-0 = <&octospi1_pins>;
pinctrl-names = "default";
status="okay";
hram: ospi-nor-flash@1 {
compatible = "st,stm32-ospi-nor";
reg = <1>;
size = <DT_SIZE_M(512)>;
ospi-max-frequency = <DT_FREQ_M(50)>;
spi-bus-width = <OSPI_OPI_MODE>;
data-rate = <OSPI_DTR_TRANSFER>;
status = "okay";
};
};
but both configurations have returned a "__device_dts_ord" error with a device number that points to the second memory device that I am instantiating. I have confirmed that both of these memory devices work when set up individually by merely commenting out the other device in the device tree. I have also confirmed that it seems this configuration is valid when set up in the STM32CubeIDE. I wanted to confirm that there wasn't something obvious that I'm missing?