cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7S78-DK: Template LRUN does not work

Leo2Ruan
Associate III

Hello,

The STM32Cube project Template_LRUN is failed on STM32H7S78-DK:

Follow the instructions from readme:

  • Build Template LRUN projects with CubeIDE v2.0.0
  • Use CubeIDE to load Template_LRUN_Boot.elf to internal flash
  • Use CubeProgrammer to program Template_LRUN_Appli.bin to external Nor-Flash and success.

Powerup the DK board and no LED is light-on.

By tracing the boot program, the MCU is hangup when copy the program from Nor-Flash to PSRAM. Crash happen on exact the copy to the first address in PSRAM. It seems PSRAM is not ready.

The error occurs at: https://github.com/STMicroelectronics/stm32-mw-extmem-mgr/blob/5c92d55af712b20030853a8ac7ddf87ab9eb1adf/psram/stm32_psram_driver.c#L138

  /* Execute the command sequence */
  for (uint8_t command_index = 0u; command_index < PsramObject->psram_public.NumberOfConfig; command_index++)
  {
    retr = PSRAM_ExecuteCommand(PsramObject, command_index);
    if (retr != EXTMEM_DRIVER_PSRAM_OK)
    {
      goto error;
    }
  }

Could you help?

Thanks!

Leo Ruan

 

1 ACCEPTED SOLUTION

Accepted Solutions
Leo2Ruan
Associate III

@Saket_Om  The problem is fixed by change the power supply to via a USB-HUB which has dedicated power adapter. Summary:

  • The PSRAM can't work with middleware STM32_ExtMem_Manager if the STM32H7S78-DK is directly connected from CN7 (STLK) to my PC's USB port.
  • The PSRAM works if the STM32H7S78-DK is connected to PC's USB port via a USB-HUB with dedicated power adapter.

What's the root cause?

Since the MCU and external nor flash are working, there is no reason to distrust the power working for PSRAM or not.

Please add warning to readmes so that we do not fall the issue again.

Leo Ruan

 

View solution in original post

3 REPLIES 3
Saket_Om
ST Employee

Hello @Leo2Ruan 

I checked the project from my side and everything i working correctly. 

Did you load the Template_LRUN_Appli.bin to external Nor-Flash at the right address?

 

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.
Saket_Om

@Saket_Om  I used CubeProgrammer with prebuilt `MX66UW1G45G_STM32H7S78-DK.stldr` to program Template_LRUN_Appli.bin to external Nor-Flash at address 0x70000000.

Actually, I ran several projects with middleware STM32_ExtMem_Manager for PSRAM. All are failed at exact same error! Only Projects\STM32H7S78-DK\Examples\XSPI\XSPI_PSRAM_MemoryMapped based on the HAL api works on my STM32H7S78-DK, MB1736-H7S7L8-D01.

I think the problem happens before jump to appli binary. Any access on PSRAM is failed.

More info:

  • I did not change a single line in LRUN source code.
  • JP6 pin2-3 is ON to use dedicated RMII_MDC(PC1) for Ethernet
  • DK is powered by CN7 from STLK.
  • SW1 is in default state '0'.

Leo

 

 

 

 

 

 

Leo2Ruan
Associate III

@Saket_Om  The problem is fixed by change the power supply to via a USB-HUB which has dedicated power adapter. Summary:

  • The PSRAM can't work with middleware STM32_ExtMem_Manager if the STM32H7S78-DK is directly connected from CN7 (STLK) to my PC's USB port.
  • The PSRAM works if the STM32H7S78-DK is connected to PC's USB port via a USB-HUB with dedicated power adapter.

What's the root cause?

Since the MCU and external nor flash are working, there is no reason to distrust the power working for PSRAM or not.

Please add warning to readmes so that we do not fall the issue again.

Leo Ruan