cancel
Showing results for 
Search instead for 
Did you mean: 

Clarification on EXT_QUAD_IN_FAST_PROG_CMD for MT25QL128

sum1
Associate II

 

 

I am currently working with the MT25QL128 flash memory using the Quad-SPI interface on an STM32H7 MCU. I have a technical question regarding the Extended Quad Input Page Program command.

In my code, the following command is used:

 

#define EXT_QUAD_IN_FAST_PROG_CMD 0x12
  • The flash write operation works correctly with this command.

However, according to the MT25QL128 datasheet, the correct command for Extended Quad Input Page Program appears to be 0x38.

My questions are:

  1. Is using 0x12 officially supported on MT25QL128, or is it just backward-compatible?

  2. Are there any scenarios where using 0x12 might lead to incorrect behavior or compatibility issues?

  3. Should I update my code to use 0x38 to be fully datasheet-compliant, even though 0x12 seems to work in practice?

I want to ensure that my Quad-SPI write operations are fully compliant with the datasheet and avoid potential issues in programming.

Thank you very much for your guidance.

4 REPLIES 4
LCE
Principal II

Very interesting... 

I guess you are using and trusting HAL?

Are you 100% that this 0x12 is really used? It isn't replaced / overwritten / #undef + #def somewhere else?

It's nowhere to be found in the datasheet, so I would not trust that at all.

I would 1) search all source code for some 0x38, 2) check with a scope what's sent, and then 3) I would simply replace the 0x12 with the 0x38.

 

sum1
Associate II

Hi, thanks for your reply.

I double-checked the whole project:

  1. EXT_QUAD_IN_FAST_PROG_CMD is defined only once, and it is 0x12.

  2. There is no #undef / #define trick anywhere.

  3. I searched the entire project; there is no 0x38 at all.

  4. The write function does use this value (0x12) directly.

So yes, I am 100% sure that the HAL QSPI driver is sending 0x12 on the Instruction line.

And the interesting part is:
The flash still accepts it and the write operation works fine.

This is why I am confused.
According to the MT25QL128 datasheet the correct command should be 0x38 (Quad Input Fast Program).
So I am trying to understand:

  • Why does the device accept 0x12?

  • Is it falling back internally to a standard page program command?

  • Or is HAL transforming the instruction in some way?

Next step, I will check with a logic analyzer to confirm exactly what opcode is sent on the QSPI lines.

If you have any insight about why 0x12 works even though it is not in the datasheet, I would appreciate it.

Thanks again.

LCE
Principal II

> Is it falling back internally to a standard page program command?

This should be found in the datasheet...

sum1
Associate II

Hi, thanks! I just wanted to confirm that EXT_QUAD_IN_FAST_PROG_CMD is defined as 0x12 in our code and used directly in CSP_QSPI_Write(). I couldn’t find it in the datasheet, so I’m checking if it’s interpreted internally by the flash or handled by HAL.