cancel
Showing results for 
Search instead for 
Did you mean: 

xspi problem on stm32h7r7

totoro
Associate II

Hi,

I used cubemx to generate three projects (Boot, Appli and ExtMemLoader) of STM32H7R7, the boot project was responsible for initializing Octol SPI FLASH, but the initialization failed, and I couldn't jump to the app.

I followed this tutorial to configure cubemx:

https://community.st.com/t5/stm32-online-courses/stm32h7rs-and-ospi-in-practice/ba-p/810411 

the hardware:

  board: art-pi2 (art-pi2 )
  mcu: STM32H7R7L8HxH
  Octal Spi Flash: W35T51NW (datasheet )

developt env:  STM32CubeMX 6.15.0
  STM32CubeCLT 1.19.0
  STM32Cube for Visual Studio Code  2.1.1
  STM32CubeProgrammer 2.20.0

the attachment is the project included cubemx project

In stm32_extmem_conf.h file, print debugging is turned on

#define EXTMEM_DRIVER_NOR_SFDP_DEBUG_LEVEL 4
#define EXTMEM_MACRO_DEBUG printf

  Boot print log:

          SFDP::1 - reset data SFDPObject to zero
          SFDP::2 - initialize the SFDPObject
          SFDP::3 - set memory link and speed to 50Mhz maximum
          SFDP::4 - analyze the SFPD structure to get driver information
                  SFDP::SFDP_GetHeader
                  SFDP::try a command configuration
                  SFDP::SFDP_ReadHeader
                  SFDP::SFDP signature::0x50444653
                  SFDP::signature of the header: OK
                  SFDP::param_number=0x2
                  SFDP::AccessProtocol=0xff
          SFDP::5 - reset the memory
                  SFDP::SFDP_MemoryReset
                  SFDP::sfdp_get_paraminfo
                  SFDP::-> type SFPD_PARAMID_FUNCTION_JEDEC
                  SFDP::-> info SFPD_PARAMID_BASIC_SPIPROTOCOL
                  SFDP::::reset 0x66 0x99
          SFDP::6 - analyze the SFPD structure to get driver information
                  SFDP::SFDP_GetHeader
                  SFDP::try a command configuration
                  SFDP::SFDP_ReadHeader
                  SFDP::SFDP signature::0x50444653
                  SFDP::signature of the header: OK
                  SFDP::param_number=0x2
                  SFDP::AccessProtocol=0xff
          SFDP::7 - read the flash ID
          SFDP:: Flash ID(0xef:0x5b:0x1a:0x2)
          SFDP::8 - collect the SFDP data
                  SFDP::SFDP_CollectData
                  SFDP::sfdp_get_paraminfo
                  SFDP::-> type SFPD_PARAMID_FUNCTION_JEDEC
                  SFDP::-> info SFPD_PARAMID_BASIC_SPIPROTOCOL
                  SFDP::sfdp_get_paraminfo
                  SFDP::-> type SFPD_PARAMID_FUNCTION_JEDEC
                  SFDP::-> info SFPD_PARAMID_4BYTE_ADDRESS_INSTRUCTION
                  SFDP::sfdp_get_paraminfo
                  SFDP::-> info SFPD_PARAMID_XSPI_V1_0
          SFDP::9 - build the generic driver information and prepare the physical layer
                  SFDP::SFDP_BuildGenericDriver
                  SFDP::-> flash size: 2^0x1a
          SFDP::10 - adjust the frequency if required
          SFDP::11 - read again the SFDP header to adjust memory type if necessary
                  SFDP::SFDP_ReadHeader
                  SFDP::SFDP signature::0x0
                  SFDP::signature of the header: KO
          SFDP::ERROR::EXTMEM_DRIVER_NOR_SFDP_MEMTYPE_CHECK
  art-pi2 bootloader
  booting...

 

0 REPLIES 0