cancel
Showing results for 
Search instead for 
Did you mean: 

QSPI external loader issue

Buelent Cakir
Associate II
Posted on November 02, 2017 at 10:29

Hi,

I'm using a S25F064F Flash on a custom STM32F446RC Board. Due the 64Pin Version of this Controller the Flash are connected as QSPI-DUAL (means only two data lines).

My issue with the attached Code is, that I can Programm only one Page even I get the error

10:06:41 : The elf loader Program function fails.

10:06:41 : Memory-Loader error

10:06:41 : Error occured during program operation!

10:06:41 : Programming error @ 0x90000003!

Afterward I see only one Page (256Bytes) programmed.

Similiar issue with the erasing of sectors. Only the first Sector are erased.

I can't see what is Happening in the Background and what is the ST-Link Util doing.

Maybe someone could have look in the Code and could found an issue.

Many Thanks in advance.

#qspi-flash #st-link-external-loader
15 REPLIES 15
Buelent Cakir
Associate II
Posted on November 02, 2017 at 14:53

I'm wondering why ST either don't give a good documentation or more examples based on HAL Drivers.

Within the application the QSPI programming and reading is working fine, but not in the external loader, because of no documentation.

Posted on November 02, 2017 at 16:41

Well the engineers used the SPL to build them originally, and I think there is also some expectation that those doing this kind of board bring-up and design have done these types of loaders before. SoC designs come with nothing. The loaders are similar to those from Keil or Segger. Work with the ST FAE supporting your account.

Would suggest building a test framework to run the plug-in, and instrument using the USART to output debugging/telemetry.

Error suggests verify readback is failing, either the data isn't matching or routine returning a code suggesting it doesn't. Kind of situation where you need hardware to evaluate dynamically.

Sorry, not downloading a dozen plus files, consider ZIPing up and presenting as a buildable project. Not sure the number of people here using IAR, F4 and 

S25F064F

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Buelent Cakir
Associate II
Posted on November 05, 2017 at 19:04

Now I add the whole IAR Project Folder

Posted on November 05, 2017 at 19:01

Hi Clive,

I fully agree to you, but I would expect from ST a propper documentation for the external loaders.

To have more visibility what is Happening during the calls I implemented UART Communication for some debug Outputs, but this is making the Situation worst.

With this uart transmit the external loader doesn't work at all, it stopping.

For example the Read funvtion works well without UART Transmit, but with it's not working. Withion the init Phase I'm tranmsiting the 'start' string and this showing in the Receiver, means the uart itself is working.

AVI-crak
Senior
Posted on November 05, 2017 at 20:16

I could not find the documentation for the S25F064A memory, but there is documentation for the S25FL064A.

A very flawed memory chip, without the support of QSPI mode.
Posted on November 05, 2017 at 20:31

Hi,

this is the Datasheet

http://www.farnell.com/datasheets/2309630.pdf?_ga=2.1435061.546026651.1509910079-83521258.1470258912

Why do you think that this Flash would be flawed?

Posted on November 05, 2017 at 20:57

S25FL064A

Memory with the letter 'A' - can only work in spi mode. The older the letter - the more opportunities.

For the letter 'P', QSPI mode is available.

For the letter 'L', DDR mode is available.

But you have the letter 'F' - it's just a higher frequency and an additional protection system.
AVI-crak
Senior
Posted on November 05, 2017 at 22:18

The last letter in the name of the flash memory is the revision of the chip. The letter defines the possibilities.

Find the documentation for your chip with the full match of the name, the last letter is very important.
Posted on November 05, 2017 at 21:48

I still can't understand you. based on the Datasheet what I provided I've the

S25FL064L, and this Flash are working with QSPI command. As I wrote above I can read from that in Dual Mode, and write in Single Mode. My issue is with the ST Link Utility / external loader infrastructure.

Therefore I'm not understanding what do you mean exactly with flawed Flash/QSPI not available?