Skip to main content
Ciuffoly
Senior
October 25, 2024
Solved

[SOLVED] I cannot flash and use the QSPI W25Q128J chip on the new STM32F746G-DISCO version C03

  • October 25, 2024
  • 4 replies
  • 3145 views

I have develop a program on STM32F746G-DISCO revision B02 with QSPI  N25Q128A13EF840E

Now the new boards revision C03 use the QSPI W25Q128JVEIQ.

I have copied the file W25Q128JVEIQ_STM32F746G-DISCO.stldr from CubeIDE 1.16 to the STM32 ST-LINK Utility\ST-LINK Utility\ExternalLoader but the external loader is not flash.

I need to change some in my code to use this new QSPI chip ?

 

Ciuffolywwwaudiodesignguide_0-1729843256117.png

 

Best answer by Ciuffoly

I have found an information about this problem so the action to solve is here:

1) download the last driver in the en.stm32cubef7-v1-17-2.zip archive with inside the w25q128j.h file

2) put this w25q128j directory inside \Drivers\BSP\Components

3) save previous stm32746g_discovery_qspi.c and stm32746g_discovery_qspi.h

4) copy new files stm32746g_discovery_qspi.c and stm32746g_discovery_qspi.h from ...v1-17-2.zip archive

5) add in the MCU GGC Compiler Preprocessor define the    USE_STM32746G_DISCO_REVC03

6) recompile

Now also ST-LINK work !

 

4 replies

mƎALLEm
Technical Moderator
October 25, 2024

Hello,

Why are you still using STLINK Utility? Please use STM32CubeProgrammer instead.

 

"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."
Tesla DeLorean
Guru
October 25, 2024

The ST-LINK Utilities have been deprecated for many years, there could be some issues with how the loader initializes or its size.

I should have some F7 W25Q128 loaders that work in this context. 

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Ciuffoly
CiuffolyAuthor
Senior
October 25, 2024

I need only to add this on  STM32CubeProgrammer   ?

Ciuffolywwwaudiodesignguide_0-1729846630167.png

 

 

 

mƎALLEm
Technical Moderator
October 25, 2024

Why are you needing to copy the External loader? It's already available:

SofLit_0-1729846588192.png

 

"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."
Ciuffoly
CiuffolyAuthor
Senior
October 25, 2024

ok, I am using the STM32CubeProgrammer with External Loader but still not see the images stored on QSPI.

 

Soon I will update the log of flash phase

 

mƎALLEm
Technical Moderator
October 25, 2024

Did you succeed to Flash the external NOR flash with CubeProgrammer or not?

"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."
Ciuffoly
CiuffolyAuthor
Senior
October 25, 2024

STM32F746G-DISO ver. B-04  with N25Q128A13EF840E

14:09:22 : Data read successfully
14:09:22 : Time elapsed during the read operation is: 00:00:00.007
14:09:25 : Memory Programming ...
14:09:25 : Opening and parsing file: FinalMono_ver5.hex
14:09:25 : File : FinalMono_ver5.hex
14:09:25 : Size : 1.52 MB
14:09:25 : Address : 0x08000000
14:09:25 : Erasing memory corresponding to segment 0:
14:09:25 : Erasing internal memory sectors [0 2]
14:09:26 : Erasing memory corresponding to segment 1:
14:09:26 : Erasing external memory sectors [0 23]
14:09:29 : Download in Progress:
14:09:40 : File download complete
14:09:40 : Time elapsed during download operation: 00:00:15.030

STM32F746G-DISO ver. C-03  with W25Q128JVEIQ

 

  14:16:59 : Data read successfully
  14:16:59 : Time elapsed during the read operation is: 00:00:00.013
  14:17:00 : Memory Programming ...
  14:17:00 : Opening and parsing file: FinalMono_ver5.hex
  14:17:00 :   File          : FinalMono_ver5 (6).hex
  14:17:00 :   Size          : 1.52 MB 
  14:17:00 :   Address       : 0x08000000 
  14:17:00 : Erasing memory corresponding to segment 0:
  14:17:00 : Erasing internal memory sectors [0 2]
  14:17:01 : Erasing memory corresponding to segment 1:
  14:17:01 : Erasing external memory sectors [0 23]
  14:17:07 : Download in Progress:
  14:17:27 : File download complete
  14:17:27 : Time elapsed during download operation: 00:00:27.461

but still no images loaded from QSPI

 

 

Tesla DeLorean
Guru
October 25, 2024

The BSP initialization, STM32 side, will need slightly different code to work into 4 pin, 4 bit operations. The commands and status registers between the Micron and Winbond are subtly different.

Code for the images to work needs to get the memory IC into memory mapped mode, and you perhaps need to verify you can read the content and that that matches expectations. 

I'd perhaps use a CRC as a quick check of integrity. ie data built on host matchs data visible on the target.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..