Skip to main content
Visitor II
April 7, 2022
Solved

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

  • April 7, 2022
  • 6 replies
  • 4462 views

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?

    This topic has been closed for replies.
    Best answer by OLync.1

    @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.

    6 replies

    Explorer II
    April 7, 2022

    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.

    Graduate II
    April 7, 2022

    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

    Explorer II
    April 7, 2022

    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).

    Graduate II
    April 7, 2022

    @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?

    OLync.1AuthorAnswer
    Visitor II
    May 2, 2022

    @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.

    Graduate
    February 8, 2023

    @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!

    OLync.1Author
    Visitor II
    February 8, 2023

    Yes I'm happy to, but I think the proper way is by pushing to a fork of the ST repo? If you can advise I'll find the code, give it a scrub and push it.

    Graduate
    February 8, 2023

    @OLync.1​ Thank you for your reply.

    Fork of the ST repo might take a longer time.

    I need it urgently and if you can share your email then I will give my SharePoint access to you where you can push the source code.