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 - edited 2025-08-13 6:10 AM
Hello @mkrk
Thank you so much for your contribution. For the difference between MB and Mb, i've escalated your request internally to check the possibility to implement it (under internal ticket number 215731). 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.
2025-08-25 1:52 AM - edited 2025-08-25 1:53 AM
Thanks for listing up the units issue!
I had my "hmmm" moment when seeing that parameter. Why should I not want memory to be in memory mode? So of course I enabled it. Maybe other people are conservative and keep parameters to default or read IDE documentation. Don't know. But I doubt all people see that hover text. The point is that you need to know it's there in order to look for it. It means you need to learn it the hard way, fail to configure properly, figure out what is this parameter actually doing or find this post here. But we are firmware engineers, not UI designers, so things are supposed to be complicated and hard. That's why we get paid.