STM32H QSPI flash loader for Keil - Page 1
Forum section: electronics / general

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 11, 2020, 07:46:40 am
content: Hi,I made a custom board based on STM32H750VB, I have added two SPI flash (W25Q64FVSSIG) to the QUADSPI controller in dual mode. I want to know if there is a flash loader algorithms already available? I have take a look at the PACK files, there seems to be only internal flash examples, is there any example that I can modify to fit my new board?

author: Mecanix
author_rank: Frequent Contributor
timestamp: August 11, 2020, 02:39:18 pm
content: I have quite a few external examples in the STM32CubeProgrammer's Bin folder. Not specific to the H7 however great for reference.C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\ExternalLoader

author: Mecanix
author_rank: Frequent Contributor
timestamp: August 11, 2020, 02:43:30 pm
content: Alternately you could follow this how-to series and get on a new driver from scratch, which is what I did a few months ago and worked great.https://www.youtube.com/results?search_query=External+QSPI+loader+how+to

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 12, 2020, 06:42:34 am
content: Mecanix thanks for the hints

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 13, 2020, 10:38:59 am
content: Mecanix,In the video Series he points to a public storage QSPI files, where is it? did you download them?

author: Mecanix
author_rank: Frequent Contributor
timestamp: August 13, 2020, 01:00:45 pm
content: See in vidExternal QSPI loader how to - 05 – QSPI driver codingThe GoogleDrive link to the dwload is in the video description:https://w w w.youtube.com/watch?v=XqCq0xtQmbI(quick link:https://drive.google.com/drive/folders/1KiaqXgiubk81EvevofK-y3LxrCl9NHfi)

author: Mecanix
author_rank: Frequent Contributor
timestamp: August 13, 2020, 01:08:54 pm
content: Oh I see what you mean, yes I remember now and that had me confused also. He did indeed mentioned something about a "Public Storage" and as yourself I've never really understood that part nor found anything qspi relevant to that P.S. he was talking about. If you ever find out let me know, out of curiosity...I'm slow today, sorry lol

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 13, 2020, 01:20:35 pm
content: Thanks, I think they deleted the files maybe

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 17, 2020, 01:04:51 pm
content: Progress;I have developed a project, Now my flash algorithms are working, and I'm trying to adapt the project to be detected and used by keil.Project files are attached, The project has this warningQuoteIt seems I can not resolve itdo you have any Idea what's wrong?

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 18, 2020, 12:03:17 pm
content: Another update,I have managed to compile the code without warnings, also the keil would detect the algorithm in the selection dialog box, Now the problem is that it would give time out error!Also It would be very helpful If you can find the ST STM32H750-DISCO keil flash loader project, so I can modify it for my project.Is there a way of debugging this kind of project?any Ideas are welcome!

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 19, 2020, 08:30:25 am
content: I have added a simple LED blink loop, in the flash loader, But it would not blinkShouldn't keil call the Init function, when it tries to program the external flash!here the code snippet for testing to see keil would actually call the Init functionCode:int Init (unsigned long adr, unsigned long clk, unsigned long fnc) {int i=0;RCC->AHB4ENR = 0x0008009F;RCC->AHB3ENR = 0x00004000;while(1){GPIOD->BSRR |= GPIO_BSRR_BS6;for(i=0;i<400000;i++)__NOP();GPIOD->BSRR |= GPIO_BSRR_BR6;for(i=0;i<400000;i++)__NOP();}}Has somebody done any external flash loader on Keil?

author: newbrain
author_rank: Super Contributor
timestamp: August 19, 2020, 01:47:21 pm
content: Not using Keil, so not much help with that, but about the blink code:Are you setting the GPIO pins as outputs somewhere else?The reset state for GPIO is input.

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 20, 2020, 05:44:48 am
content: QuoteYes, I have make them output in Init function.

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 20, 2020, 01:50:25 pm
content: QuoteNow I have followed these video series using STMCUbe IDE, ST-Link and STM32CubeProgrammerMy sample test project works perfectly (I can do program, erease, Memory map etc...), Also I follow the instructions and make a ST-Link external loader, Now STM32CubeProgrammer would trough this errorPlease if you have done it with H7 series Help.The project files are attached.