This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I debug a new flash algorithm which is not working yet?

I need to flash code into an external HyperFlash (via OctoSPI on STM32H7A3), and I wrote a new flash algorithm. Now this is not working and I need to debug it to fix the problem.

How can this be done???

Thank you for any help!

Parents
  • Yes, there is a mistake in the Dbg_RAM.ini file on page 10 of Application Note 333. Since the test application is linked to the RAM address 0x20000000 (see scatter file on page 9), the addresses in Dbg_RAM.ini should read 0x20000000 and 0x20000004 rather than 0x20020000.

    Here is the correct content of this initialization file:

    /*------------------------------------------------------------
      Setup() configure PC & SP for RAM Debug
     *----------------------------------------------------------*/
    FUNC void Setup (void) {
      SP = _RDWORD(0x20000000);        // Setup Stack Pointer
      PC = _RDWORD(0x20000004);        // Setup Program Counter
      _WDWORD(0xE000ED08, 0x20000000); // Setup Vector Table Offset Register
    }

    /*-----------------------------------------------------------
      OnResetExec() configure PC & SP after reset for RAM Debug
     *----------------------------------------------------------*/
    FUNC void OnResetExec (void) {
      Setup();
    }

    LOAD %L INCREMENTAL      // load the application

    Setup();                 // Setup for Running

    //g, main                // uncomment to run through the startup code and stop at main()

Reply
  • Yes, there is a mistake in the Dbg_RAM.ini file on page 10 of Application Note 333. Since the test application is linked to the RAM address 0x20000000 (see scatter file on page 9), the addresses in Dbg_RAM.ini should read 0x20000000 and 0x20000004 rather than 0x20020000.

    Here is the correct content of this initialization file:

    /*------------------------------------------------------------
      Setup() configure PC & SP for RAM Debug
     *----------------------------------------------------------*/
    FUNC void Setup (void) {
      SP = _RDWORD(0x20000000);        // Setup Stack Pointer
      PC = _RDWORD(0x20000004);        // Setup Program Counter
      _WDWORD(0xE000ED08, 0x20000000); // Setup Vector Table Offset Register
    }

    /*-----------------------------------------------------------
      OnResetExec() configure PC & SP after reset for RAM Debug
     *----------------------------------------------------------*/
    FUNC void OnResetExec (void) {
      Setup();
    }

    LOAD %L INCREMENTAL      // load the application

    Setup();                 // Setup for Running

    //g, main                // uncomment to run through the startup code and stop at main()

Children
No data