cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F750Z8 and flash loader

GTrom
Associate II

Hello everyone,

I've just develop my board with this MCU and a QSPI Flash from Micron (N25Q128).

The connections suggested by the Cube are:

CS -> PB6

CLK -> PB2

D0 -> PF8

D1 -> PF9

D2 -> PE2

D3 -> PA1

Checked them and they are phisically good.

I'm using IAR so I wrote my own flashloader following the one for the STM32F7508 discovery board, and just changing the MAC file to remap the connections between MCU and QSPI flash.

It doesn't work. When it's time to download the application in the flash IAR stands still, doing nothing. Here below the Debug Log

Wed Aug 28, 2019 07:55:30: IAR Embedded Workbench 8.40.1 (C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\bin\armproc.dll) 

Wed Aug 28, 2019 07:55:30: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\config\flashloader\ST\TI0012080.mac 

Wed Aug 28, 2019 07:55:30: Connected to ST-Link/V2 [SWD mode 1800 kHz] [Access port: 0] Firmware V2.J34.S7 (Probe no: 21260667) 

Wed Aug 28, 2019 07:55:30: Initial reset was performed 

Wed Aug 28, 2019 07:55:30: ---- Prepare hardware for the flashloader ---- 

Wed Aug 28, 2019 07:55:30: ---- Setup QSPI ---- 

Wed Aug 28, 2019 07:55:30: 2768 bytes downloaded and verified (17.33 Kbytes/sec) 

Wed Aug 28, 2019 07:55:30: Loaded debugee: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\config\flashloader\ST\N25Q128A_STM32F7508-DISCO.out 

Wed Aug 28, 2019 07:55:30: Target reset 

Wed Aug 28, 2019 07:55:49: Unloaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\config\flashloader\ST\TI0012080.mac 

Wed Aug 28, 2019 07:55:50: IAR Embedded Workbench 8.40.1 (C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\bin\armproc.dll) 

Where do I am wrong?

Anyone can kindly help?

Thank you very much in advance

GianLuca

P.S: I tried with a Winbond QSPI Flash (W25Q128) and changing the N25Q128A_STM32F7508-DISCO.out with FlashSTM32F7xx_QSPI_WINBOND.out but I had the same results.

5 REPLIES 5

Does Flash read, write and erase properly from within your own test application? Are the clock and crystal sources the same as DISCO board?​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Andreas Bolsch
Lead II

Hm, the only difference to the disco are D0 to D3, right? So porting from the disco loader should be straightforward --- in theory.

Did you enable the peripheral clocks for PA, PE and PF? Any activity on NCS, CLK, D0-D3 pins?

Sigh, this sort of trouble pops up at least twice a week here ... The concept of writing a special loader for each and every board / flash chip combination is not that user friendly.

 /* D0, D1 (PF8:AF10, PF9:AF10)*/

 Reg = __readMemory32(0x40021424, "Memory"); // GPIOF.AFR[1]

 Reg &= ~((0xFUL << 4) | (0xFUL << 0));

 Reg |= ((0xAUL << 4) | (0xAUL << 0));

 __writeMemory32(Reg, 0x40021424, "Memory");

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

Hi Clive, Hi Andreas,

thank you for your reply and sorry if I come back late.

@Clive: yes, you are right. The Alternate Functions for D0,D1 were wrong. I corrected but nothing changed.

@Andreas: if I try to Write / Read the QSPI running my firmware from the internal flash it works... I'm working with Mapped Mode, so I've something like this:

QSPI_Startup();

 SDRAM_Startup();

 val = 0xAA558637;

 *(uint32_t*)(0x90000000) = val;

 val++;

 val = *(uint32_t*)(0x90000000);

and val is 0xAA558637

I'll try to see if I can modify a flashloader, if needed.

Meanwhile, any other ideas? 🙂

Thank you very much guys

GianLuca

GTrom
Associate II

News: I just discovered that the flash loader effectively programs the QSPI flash.

But it cannot read back what it wrote. Then verification fails (it always read 0x00).

I saw this but reading back the QSPi Flash from a small app running inthe internal flash, and the stored data was correct.

Now I must understand why it doesn't read back the QSPI

Bye

GianLuca