cancel
Showing results for 
Search instead for 
Did you mean: 

How to build an external loader for ST-LINK programmer for Micron flash

OLync.1
Associate III

I have a board based on the STM32L4R9 Discovery board. A key difference is that my board has Micron external flash (MT35XL512ABA1G12-0SIT) rather than Macronix (MX25LM51245GXDI0). The ST-LINK programmer fails to erase my flash, presumably because the OCTOSPI timings are different. It appears I have to build a custom external loader as I don't see one in https://github.com/STMicroelectronics/stm32-external-loader.

I am struggling to find the necessary timing data for the Micron flash. Has anyone done this already?

1 ACCEPTED SOLUTION

Accepted Solutions
OLync.1
Associate III

@Community member​ Thanks very much for the detailed datasheet. I used it to port the Macronix external loader and produced an .stldr that successfully erases/programs the external flash on our board. Only a few changes were required - a few command codes and some register bit mappings.

View solution in original post

11 REPLIES 11
Andreas Bolsch
Lead II

I'd suppose you could use a loader for the MX25LM51245 with some rather simple modifications ... Problem is that the MT35XL512's datasheet is available only after signing an NDA. Without the full datasheet a lot of experimenting and patience might be necessary :(

Maybe it's only a question of a different chip ID, maybe some register settings are different. The starting point would be to inspect the ID and trying to set and reset the write enable flag and check the results via read status register.

Yeah, Micron's told me to FO on a couple of occasions when trying to get specific data sheets to write tools/loaders, people should probably just buy from Macronix or Winbond

Related

https://community.st.com/s/article/source-code-of-external-loader

https://community.st.com/s/question/0D53W00000aozvcSAA/1gb-memory-usage-instead-of-512mb-for-stm32l4r9ai

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

You're certainly right. If they make such a fuzz about a 'most secret' details, they should simply stop advertizing their stuff.

In particular, octal devices are now available from more other vendors as well, e.g. Adesto, Gigadevice, and Infineon (the latter one had the same problem before Cypress was bought by Infineon, fortunately Infineon had overruled Cypress's silly attitude).

I'm not even sure why they need to hide any details, the security stuff could be removed from public facing documents, if critical, but usually security-thru-obscurity is one of the least effective paths to actual security.

If I hold my private and public keys, and I program the private key into it, or have Micron's (or whomever's) PUBLIC key, really not sure how I'd use that to breach someone else's security, if it were actually "secure". Most of the transactional mechanics of such things are relatively straight forward to analyze.

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

@OLync.1​  if you have data sheets, command structures, or BSP for the MT35XL512ABA please push to sourcer32@gmail.com so I can look at what it will take to get STLDR/FLM support ported to these parts.

@ChahinezC​ do you have any materials beyond the App Note implementing a BSP or STLDR for the Micron MT35XL512ABA, a part reference that comes up several time but with no additional support for. Or perhaps a direct contact person within Micron responsible for QSPI/OCTOSPI devices I can work with to get an NDA in place with, or interested in getting broader support on ST platforms?

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

Found these whilst shot-gunning with Google

This is the multi-die, low voltage variant

https://datasheet.octopart.com/MT35XU02GCBA2G12-0AAT-Micron-datasheet-138896808.pdf

Less Brief Data Sheet 23 page, vs 10-11 page one

https://www.spinics.net/lists/linux-spi/attachments/pdfoAHWATDpgQ.pdf

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

@Community member​ Thanks very much for the detailed datasheet. I used it to port the Macronix external loader and produced an .stldr that successfully erases/programs the external flash on our board. Only a few changes were required - a few command codes and some register bit mappings.

Xccela™ Flash Memory Data Sheet Brief MT35X 1.8/3V, Octal I/O, 4KB/32KB/128KB Sector Erase

https://www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt35x_xccela/die-rev-a/opi-opcodes.pdf

{"mt35xu256aba", INFO(0x2c5b19, 0x0, 128 * 1024, 256, E_FSR) },

{"mt35xu512aba", INFO(0x2c5b1a, 0x0, 128 * 1024, 512, E_FSR) },

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

@OLync.1​  and @Community member​ ,

I am also using MT35XL512 micron flash with STM32L4R9 and currently receiving errors to configure the device in Octat mode from Extended SPI mode.

@OLync.1​ , It looks like you have already worked on this flash and implemented code to erase/program the external flash, Can you please share that source code with me? It will save my time and really help me to move forward/progress.

Thanks in advance!