cancel
Showing results for 
Search instead for 
Did you mean: 

Can I program external spi flash memory with ST-LINK ?

Egemen
Associate II

Is there a way to program spi flash using st-link? The spi flash which i am using is AT25SF321B.

1 ACCEPTED SOLUTION

Accepted Solutions

No

Perhaps you want something like a FlashCat or Universal Programmer ​

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

View solution in original post

7 REPLIES 7
MM..1
Chief III

Yes if is connected into STM32 SPI

Can i program spi flash from binary file?

Yes

You'd need to write an External Loader, that supports your memory device, and the pin/peripheral means of connecting to it, and doing the read, erase, and write.

Methodology materially similar

https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-moocs/external_QSPI_loader.html

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

Is there any way to program spi flash using only ST-LINK? I mean connecting spi flash directly to ST-LINK for programming spi flash IC.

No

Perhaps you want something like a FlashCat or Universal Programmer ​

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

https://www.embeddedcomputers.net/products/FlashcatUSB/

One could also add a ZIF socket to a NUCLEO or DISCO type board, perhaps via a shield adapter, and then code an app, and program and communicate with the memory chip. Say using the VCP as a means to send a .HEX file, or something.

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

> Say using the VCP as a means to send a .HEX file, or something.

Semihosting I/O can be used to easily write code that moves data from the host machine and programs it in-system. It is slowish but simple. Just opens one or several files on the host and reads.

We tested it on CubeIDE + OpenOCD and EWARM, both over st-link v3.