cancel
Showing results for 
Search instead for 
Did you mean: 

Micron flash versus Macronix flash

FrankNatoli
Associate III

STM32H7B3I EVAL hosts a Macronix flash.

stm32h7b3i_eval_ospi.c and mx25lm51245g.c implement functions to initialize, erase, read and write the Macronix flash.

Unfortunately, Macronix flash is unavailable in commercial quantities and we're planning to use Micron MT35X.

Macronix OCTAL functionality covers apparently all flash operations, almost 50 separate functions, each with a two byte function code.

Micron OCTAL functionality is far more limited, only supporting "read" and "page program" and then with single byte function codes.

Does STM make available driver software for the Micron MT35X part?

21 REPLIES 21

May be you should consider QUAD parts, or dual banking

MX66L1G45GMI-08G 32K parts at DigiKey, around 15K of the 512Mb

>>Does STM make available driver software for the Micron MT35X part?

Generally ST assumes your own embedded engineer(s) will take some responsibility for coding things that ST doesn't deliver on it's own boards. The FAE for your account might have access to other resources as they are at the sharp-end of customer related coding, and collectively code things to solve their issues. They might be able to recommend contractors too.

Getting parts to actually run in Memory-Mapped mode shouldn't require a vast amount of code.

Programming parts, gets to be more of a challenge, but there's usually half-a-dozen ways of achieving that goal without implementing them all.

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

Related https://community.st.com/s/question/0D53W00001U2YOcSAN/how-to-build-an-external-loader-for-stlink-programmer-for-micron-flash

@OLync.1​ 

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

"Generally ST assumes your own embedded engineer(s) will take some responsibility for coding things that ST doesn't deliver on it's own boards."

Well, in a remarkable coincidence, I am the "embedded engineer" on this project, and I was simply hoping to discover why what appeared to be a very limited OCTAL command set for Micron was in fact not true, see mx25lm51245g.h, text lines 157 through 201, which the STM editor will not allow me to post.

Perhaps use the GitHub repository rather than in-lining it.

https://github.com/STMicroelectronics/stm32-mx25lm51245g/blob/main/mx25lm51245g.h#L154

These look to be 16-bit, but the include file kitchen sinks the entire command set. Operationally you need a very small subset of these.

The devices themselves should be programmable via the SPI (1-bit) command methods, so that they can be programmed with a Universal Programmer via an 8-pin DIP header.

From a BSP read perspective, you need to walk the device into the appropriate mode so the pin, drive and dummy cycle on both sides of the interface are consistent, and then the Memory-Mapped Read method is basically a "READ" command template that the peripheral stuffs a random address into. This ideally being the command giving the lowest latency and highest bandwidth. Likely a DDR/DTR mode, depending on the stacked die construction, and signal integrity as the speed increases, and more dummy cycles to allow the flash array to be copied/prefetched into the burst output buffers.

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

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

The 16-bit commands, are basically the 8-bit ones with the second byte in the pair the inverted version of the first.

A lot of that stems from the fact that the QUAD and OCTO parts share a common die/design, allowing one die to be fabbed and validated, and bonded out, and or stacked, such that its functional in multiple modes.

Both Winbond and Macronix use stacked 512Mb die in their 1Gbit (2x die) and 2Gbit (4x die) offerings.

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

I do have that Micron document, and its Table 9 contains the command set.

The following OCTAL commands are referenced by mx25lm51245g.c, called by stm32h7b3i_eval_ospi.c, and do not appear to have any equivalent value in Table 9:

MX25LM51245G_OCTA_READ_STATUS_REG_CMD = 0x05FA

MX25LM51245G_OCTA_WRITE_ENABLE_CMD = 0x06F9

MX25LM51245G_OCTA_SECTOR_ERASE_64K_CMD = 0xDC23

MX25LM51245G_OCTA_SUBSECTOR_ERASE_4K_CMD = 0x21DE

MX25LM51245G_OCTA_BULK_ERASE_CMD = 0x609F

MX25LM51245G_OCTA_READ_ID_CMD = 0x9F60

MX25LM51245G_OCTA_PROG_ERASE_SUSPEND_CMD = 0xB04F

MX25LM51245G_OCTA_PROG_ERASE_RESUME_CMD = 0x30CF

MX25LM51245G_OCTA_RESET_ENABLE_CMD = 0x6699

MX25LM51245G_OCTA_WRITE_CFG_REG2_CMD = 0x728D

MX25LM51245G_OCTA_READ_CFG_REG2_CMD = 0x718E

There are two Macronix OCTAL read commands:

MX25LM51245G_OCTA_READ_CMD = 0xEC13 [presumably STR/SDR]

MX25LM51245G_OCTA_READ_DTR_CMD = 0xEE11

And four Micron OCTAL read commands:

Octal Output Fast Read = 0x8B

Octal I/O Fast Read = 0xCB

DDR Octal Output Fast Read = 0x9D

DDR Octal I/O Fast Read = 0xFD

I can find no explanation of "Output" versus "I/O" and thus which Micron functions correspond to which Macronix functions.

Thus, while you are right, not all the OCTAL flash functions listed in mx25lm51245g.h need be implemented, quite a few do, and I am at a loss as to how to do so.

What pins are you using?

Assuming you're using a BGA24 configuration

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

Apologies, I have pinged our hardware guys but no reply yet.

Pavel A.
Evangelist III

ST has a collection of flash drivers here.

Scroll down to "STM32Cube BSP QSPI/OSPI Components Drivers"