2025-08-13 2:47 AM
I'm using STM32CubeIDE version 1.19.0 and MxCube version 6.15.0.
In ExtMemLoader middleware configuration there's a Memory Size option:
The *** thing is that it lists C macro options that are capital letters (by naming convention) so megabits (acronym Mb) turn into megabytes (MB). But that "16MB" macro is actually 16 megabits (2 megabytes) in stm32h7rsxx_hal_xspi.h:
#define HAL_XSPI_SIZE_16MB (0x00000014U) /*!< 16 Mbits ( 2 MBytes = 2^(20+1)) */
That explains why I get bus fault beyond 2 MiB and wasted hour on checking everything.
The XSPI configuration option for size is clearer because it writes full unit in "Mbits".
Please use clear units.
Another confusion comes from the "Memory Mode" option in XSPI peripheral. CubeMX allows to pick Enable or Disable. But in generated code it becomes clear that it is actually enablement of dual-memory mode or not, hence single-memory mode. Some parameters have explanation box appearing. I feel this one needs explanation box, better parameter naming or better options also.
2025-08-13 3:21 AM
Hello @mkrk
Thank you so much for your contribution, For the difference between MB and Mb. i will escalate your request internally. For the Memory mode, there is a note on each option:
You only need to put the cursor exactly on the option and it will show.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.