cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in External memory code execution when ported from STM32F756NG to STM32F779NI

A3
Associate III

Hi,

I have 2 eval boards STM32F756G-EVAL2 and STM32F779I-EVAL.

I am using this example from STM32FCube library

\en.stm32cubef7\STM32Cube_FW_F7_V1.14.0\Projects\STM32756G_EVAL\Applications\ExtMem_CodeExecution\ExtMem_Boot .

I am able to run this sucessfully on STM32F756G-EVAL2. But same thing when I am porting on STM32F779I-EVAL, it stucks in bootloader code in QSPI external flash init.

I am using below mode:

XiP code execution from external QSPI Flash, Data in internal SRAM.

After debugging, I found that it stucks in bootloader code in below call stack

Memory_Startup()->QSPI_Startup()->QSPI_EnterMemory_QPI()->HAL_QSPI_AutoPolling

I checked schematic both eval boards using same memory N25Q512A.

Note: It stucks in HAL_QSPI_AutoPolling function call after 1st enable write operations in QSPI_EnterMemory_QPI().

Let me know if anyone have used same example or any basic idea about the root cause will help

3 REPLIES 3

>>Let me know if anyone have used same example or any basic idea about the root cause will help

The number of people with these boards is rather finite.

Does the example for the F779I-EVAL work?

STM32Cube_FW_F7_V1.14.0\Projects\STM32F769I_EVAL\Examples\QSPI\QSPI_ExecuteInPlace

Try diffing that to see what changed

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
A3
Associate III

Thanks for quick reply, Please find below reply inline.

Does the example for the F779I-EVAL work?

STM32Cube_FW_F7_V1.14.0\Projects\STM32F769I_EVAL\Examples\QSPI\QSPI_ExecuteInPlace

Yes, this example works.

Try diffing that to see what changed

QSPI settings and protocols are different for this example.

Following are the descriptions for both examples with respect to QSPI XiP configurations:

STM32F756g-EVAL2: It actually uses Quad mode of external flash memory, enable XiP mode done by configuring volatile configuration register and enhanced volatile configuration register of external flash. It uses Quad I/O Fast Read.

STM32F779NI: It doesn't actually configure volatile configuration register and enhanced volatile configuration register. Uses Quad Output Fast read in normal SPI protocol (extended SPI). Also this example uses QSPI in interrupt mode. Example writes a function in external flash and execute it by calling the function directly.

My final application is suitable for External Memory code execution example, having a bootloader which will configure QSPI/External flash in Memory mapped mode/XiP and jump to application code as the one in STM32F756NG.

Also, the example at STM32Cube_FW_F7_V1.14.0\Projects\STM32F769I_EVAL\Examples\QSPI\QSPI_ExecuteInPlace is having exact similar QSPI config code as the example at  STM32Cube_FW_F7_V1.14.0\Projects\STM32F756G_EVAL\Examples\QSPI\QSPI_ExecuteInPlace.

So, still wondering what is the difference, if external memory chip is exactly similar, controller pins for QSPI connection is also similar. Also checked by doing some minor changes with respect to SystemClock_Config() by referring code of STM32F769I-EVAL (system clock at 216 Mhz), but still didn't worked.

If anyone have STM32F779I-EVAL board and using Keil, can check by just changing the target (STM32F779NI)of this example at STM32Cube_FW_F7_V1.14.0\Projects\STM32756G_EVAL\Applications\ExtMem_CodeExecution\ExtMem_Boot .

A3
Associate III

Anyone using STM32F779I-Eval board?

Let me know if you encounter the similar behaviour as posted in above comment