Hello, I'm working on a STM32F429ZI board and S29GL128S External NOR Flash in order to save some code (images among others). I'm trying to configure the project, but I do something wrong because the KEIL finds errors. In order to generate an .FML file, I copied the project S29GL064Nx2 from C:\Keil\ARM\Flash and adapt it according to S29GL128S memory. In this project (S29GL128S), I have some doubts:
1) Is the Device of the "Options for Target" configuration STM32F429ZI? 2) Is important the Read/Only Memory Areas configuration? 3) The *.Lin file I put the same as S29GL064Nx2 project. Is it correct?
The address of flash starts 0x0000000 and its size is 0x1000000 (16MB). According to Reference Manual of STM32F429 (RM0090), the address to NOR flash, is from 0x60000000 to 0x6FFFFFFF. On STM32F429 project, I've selected in "tions for Target" > Debug > Settings > Flash Download the *.FLM file from S29GL128S.
i.imgsafe.org/0fee591383.png
The files which I want to save in the NOR flash, I've selected in "Options for file" ROM1 as a Memory Assigment.
i.imgsafe.org/0feddb3759.jpg
But, I have a Flash timeout error, can you help me about what is produced this error?
i.imgsafe.org/0fec83e876.jpg
Is there any tutorial which explains step by step how I have to configure?
Thanks in advance
Your images didn't show up here, but I referenced them from ST's forum. By default, the project Debug->Settings->Flash Download window will have your internal flash already setup. You'll need to add a second programming algorithm so your device programmer can program both the internal MCU flash and external flash chip on your board.
Take a look at the Keil documentation on adding a flash algo to a project: * http://www.keil.com/support/docs/3656.htm * touch GFX has some pointers as well: touchgfx.zendesk.com/.../205187072-How-do-I-program-the-STM32756G-EVAL-board-
Thank you Brian,
I hope you can see now:
https://ibb.co/hLbnwF https://ibb.co/c2hhVa https://ibb.co/hpVEbF
I did the configuration throught flash algorithm. You can see here:
https://ibb.co/k2id3v
Any idea?
Are you using known working h/w (i.e. the eval board from ST)? Probably not since it appears to use M29W256GL70ZA6E nor flash. . .What's your target h/w?
If you are, grab the user manual:
www.st.com/.../stm32429i-eval.html
It looks like if JP9 needs to be taken off the board to disable the NOR flash write protection (page 19 of the user manual). Also, STLink can program external flash, so you may want to check out the ST Link utility
Thanks Brain,
Our target h/w is a custom board based on STM32F429ZI adding a NOR flash memory S29GL128S. The electrical drawing of the NOR flash memory is the same as STM32F429I evaluation board and the write protection is disabled in our board.
Have you gone through hardware verification yet? Creating an application that writes and reads from flash without attempting to map it into program space would be a good start.
Untested hardware and a new programming environment is a very unpleasant combination, I usually try and bring up each side incrementally. If it were me, I'd be reaching for the logic analyzer after writing as purpose built application that exercises the flash to help get some insight as to what's actually going on.
Hi Brian,
thank you again for your comments,
I made a debug application for ST-Link Utility's external loader but when I'm debugging I can read, program and erase done but if I build such as an external loader I can't program/erase. Maybe there is a bad initialization when it works such as an external loader, I 'm still investigating. The important thing is I have a program that can read, program and erase and this a verification that the hardware works.
In Keil, I found the S29GLxxx flash programming with the legacity suport v4 and you can set the S29GL128P target which is similar our memory flash S29GL128S. Using this flash programming I can't program/erase any projecte from keil. I've been looking closely the S29GLxxx and there is never initialized any peripheral like FSMC or RCC. This initialization must be embedded in the code or throught a debug init file? If only I load a projecte without debugging is needed a init file?
I'm glad you were able to verify hardware functionality - that should make for much easier debugging now that there's absolute confidence that it's "just" a firmware issue!
I believe you need to use a debug init file for what you're trying to do. Here's an old thread with someone that was in a similar situation: http://www.keil.com/forum/60124/
Also, check out app note AN2784 from ST regarding executing code from external NOR flash (specifically page 15, which points at an example application running out of flash): www.st.com/.../cd00200423.pdf
There's typically a NOR execute example included in the Std Peripheral Lib package downloadable from ST, which might also be a good reference, although it probably won't provde any help with an INI file you'd need for the debugger.
Post back with any further progress, I'd like to hear about it - you guys are definitely on the right track.
Here are some additional hints for the debugger INI from Keil: http://www.keil.com/support/docs/3146.htm
View all questions in Keil forum