cancel
Showing results for 
Search instead for 
Did you mean: 

Error in STM32Cube_FW_H7RS_V1.1.0

Intector
Senior

Hello,

I'm working on a project where I'm using an STM32H7R3L8H6H and an MX25UW25645G. It isn't possible to get the Flash working on XSPI2 when using the ExtMemLoader generated by STM32CubeMX. I checked the example in the firmware package and found the following errors in it:

  1. In the STM32CubeMX XSPI2 configuration, "Parameter Settings" is the "Memory Size" with 32GBit selected.
  2. The "__FLASH_SIZE" in the linker file "STM32H7S3L8HX_ROMxspi2_app.ld" is set to 0x08000000.

Since the NUCLEO_STM32H7S3L8 board is using the MX25UW25645G chip, those settings are incorrect.

They should be 256GBit instead of 32GBit and 0x02000000 instead of 008000000.

Where can I find the source code for the "MX25UW25645G_NUCLEO-H7S3L8.stldr" which is shipped with the STM32CubeProgrammer? It looks like this loader is working, but I want to use my own loader for my project. Unfortunately, there is not one working example anywhere that uses the MX25UW25645G, even if this chip is used by STM on their NUCLEO board. 

It is very frustrating and time-consuming to work with the STM32H7RS series MCUs.

The STM32H7RS series MCUs are very powerful devices, but with this kind of lagging support, it becomes very frustrating and time-consuming to implement these devices in any design.

 

keep moving and never forget:

"Always be yourself. Unless you can be a pirate. Then always be a pirate."

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

Hello @Intector,

 

Thank you for bringing this issue to our attention. I reported it internally.

MX25UW25645G_FLASH_SIZE is 256Mbits/32MByte.

"__FLASH_SIZE" in the linker file "STM32H7S3L8HX_ROMxspi2_app.ld"  should be 0x02000000.

For the external flash loader, I recommend you to look to How to create an external flash loader for an STM32H7RS.

The primary objective of this article is to provide a comprehensive step-by-step guide on creating an external flash loader to interface with external memories. This demonstration uses the NUCLEO-H7S3L8.

 

These resources can help you to start with STM32H7RS MCUS:

I apologize for any inconvenience.

Internal ticket number: 201048 (This is an internal tracking number and is not accessible or usable by customers

 

Thank you.

Kaouthar

 

 

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.

View solution in original post

4 REPLIES 4
KDJEM.1
ST Employee

Hello @Intector,

 

Thank you for bringing this issue to our attention. I reported it internally.

MX25UW25645G_FLASH_SIZE is 256Mbits/32MByte.

"__FLASH_SIZE" in the linker file "STM32H7S3L8HX_ROMxspi2_app.ld"  should be 0x02000000.

For the external flash loader, I recommend you to look to How to create an external flash loader for an STM32H7RS.

The primary objective of this article is to provide a comprehensive step-by-step guide on creating an external flash loader to interface with external memories. This demonstration uses the NUCLEO-H7S3L8.

 

These resources can help you to start with STM32H7RS MCUS:

I apologize for any inconvenience.

Internal ticket number: 201048 (This is an internal tracking number and is not accessible or usable by customers

 

Thank you.

Kaouthar

 

 

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.

Hey KDJEM.1,

Thank you for your reply. Mohamed_Aziz_REZGUI's post "How to create an external flash loader for an STM32H7RS" is very helpful. I got my external flash running by following the descriptions in AN5050, but the document is somewhat flawed. 

Intector
Senior

Hey KDJEM.1,

Do you know a description of using an APS256XXN-OBRx with an STM32H7RS series MCU?

I made a board for my project, which is based on an STM32H7R3L8H6H MCU, an APS256XXN-OBR-BG 256MBit PSRAM on HEXASPI, an MX25UW25645GXDI00-T 256MBit flash on OCTOSPI, and an EMMC08G-MV28-01J10 SDMMC, among other peripherals. 

Here are some pictures of it:

20250118_212240.jpg20250118_202320.jpg

 

Thanks to Mohamed_Aziz_REZGUI's post, I was able to optimize the MX25UW25645GXDI00-T on the OCTOSPI.

The APS256XXN-OBR-BG on the HEXASPI is working, but it's probably not optimal. The example code for the STM32H7S78-DK that I found in the firmware package "STM32Cube_FW_H7RS_V1.1.0" contains several bugs and flaws. I spent countless hours searching the Internet for something useful, but unfortunately, I couldn't find anything. 

Here is one example of what I think can't be correct:

 

static void Configure_APMemory(void)
{
  /* MR0 register for read and write */
  uint8_t regW_MR0[2]={0x24,0x8D}; /* To configure AP memory Latency Type and drive Strength */
  uint8_t regR_MR0[2]={0};

  /* MR8 register for read and write */
  uint8_t regW_MR8[2]={0x4B,0x08}; /* To configure AP memory Burst Type */
  uint8_t regR_MR8[2]={0};

  /*Read Latency */
  uint8_t latency=6;

  /* Configure Read Latency and drive Strength */
  if (APS256_WriteReg(&hxspi1, MR0, regW_MR0) != HAL_OK)
  {
    Error_Handler();
  }

  /* Check MR0 configuration */
  if (APS256_ReadReg(&hxspi1, MR0, regR_MR0, latency ) != HAL_OK)
  {
    Error_Handler();
  }

  /* Check MR0 configuration */
  if (regR_MR0 [0] != regW_MR0 [0])
  {
    Error_Handler() ;
  }

  /* Configure Burst Length */
  if (APS256_WriteReg(&hxspi1, MR8, regW_MR8) != HAL_OK)
  {
    Error_Handler();
  }

  /* Check MR8 configuration */
  if (APS256_ReadReg(&hxspi1, MR8, regR_MR8, 6) != HAL_OK)
  {
    Error_Handler();
  }

  if (regR_MR8[0] != regW_MR8[0])
  {
    Error_Handler() ;
  }
}

 

This routine is used to configure and initialize the PSRAM chip. 

 

The data sent to the MR0 and MR8 registers don't match the description in the APS256XXN-OBR-BG's datasheet.

 

  /* MR0 register for read and write */
  uint8_t regW_MR0[2]={0x24,0x8D}; /* To configure AP memory Latency Type and drive Strength */
  uint8_t regR_MR0[2]={0};

  /* MR8 register for read and write */
  uint8_t regW_MR8[2]={0x4B,0x08}; /* To configure AP memory Burst Type */
  uint8_t regR_MR8[2]={0};

 

 

 

Please let me know if you know of any good documentation about this. In the meantime, I'll keep tinkering with my board and hope to learn about that initialization.

 

Thank you, and never forget:

"Always be yourself. Unless you can be a pirate. Then always be a pirate."

KDJEM.1
ST Employee

Hello @Intector,

 

Thank you for updating this post.

 

I think that the first request answered "Thank you for your reply. Mohamed_Aziz_REZGUI's post "How to create an external flash loader for an STM32H7RS" is very helpful. I got my external flash running by following the descriptions in AN5050". So, click on Accept as Solution on the reply which solved your issue or answered your question.

For the second issue with PSRAM, I recommend you to create a new thread.

 

->The example code for the STM32H7S78-DK that I found in the firmware package "STM32Cube_FW_H7RS_V1.1.0" contains several bugs and flaws.

->I got my external flash running by following the descriptions in AN5050, but the document is somewhat flawed.

I already reported internally the XSPI_PSRAM_MemoryMapped example for checking memory size, ChipSelectBoundary, and the MR0 and MR8.

If you noted any issue, do not hesitate to let us know. Your feedback and comments are most welcome.

->The APS256XXN-OBR-BG on the HEXASPI is working, but it's probably not optimal. 

May be X-CUBE-PERF-H7RS package can help you and precisely WRITE_PSRAM and READ_PSRAM examples can help you.

This document is delivered with the X-CUBE-PERF-H7RS expansion package dedicated to STM32H7Sx microcontrollers running on STM32H7S78-DK board. 

I hope this help you.

As I mentioned if the PSRAM issue remains unresolved, I recommend you to create a new thread dedicated to this behavior.

 

Internal ticket number: 200908 (This is an internal tracking number and is not accessible or usable by customers).

Thank you.

Kaouthar

 

 

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.