Skip to main content
Visitor II
July 18, 2024
Question

Serial NOR Flash read/write operation

  • July 18, 2024
  • 3 replies
  • 1942 views

I need to read/write data into the external Serial NOR Flash (MX25U25645GMI00) via Quad SPI of STM32L412RB board using STM32CubeIDE.

  1. I was able to get the Device ID of the MX25U25645GMI00.
  2. I am unable to write/read data into the MX25U25645GMI0 in Auto Polling Mode.
  3. I need support in writing data using 2 or 4 I/O lines (I was able to pass the Write Enable Command and Chip Erase Command successfully).
  4. I need support in reading data using 4 I/O lines (But I get 255 or 136 dec in all the bytes of receive buffer).
    This topic has been closed for replies.

    3 replies

    Technical Moderator
    July 19, 2024

    Hello @VSASI1 and welcome to the Community :),

    Are you able to write/read data in Indirect Mode?

    Could you please take a look at this example "QSPI_ReadWrite_IT" may help you.

    Also, I recommend you to refer to these references How to configure OctoSPI and QuadSPI with an STM32? and AN4760 and check your QuadSPI configuration 

    Thank you.

    Kaouthar

     

    Graduate II
    July 19, 2024

    Going to be materially very similar to all other QSPI implementations

    Will need to use the 4-byte / 32-bit addressing for a memory >16MB (128Mb)

    Writes would be aligned 256-byte pages

    2-line should be a matter of the right commands and bit width settings for each of the appropriate phases (ie cmd,address,alt,data..)

    4-line likely needing some interaction with status register to switch into the 4-pin "QE" mode mapping the usual WP/HOLD pins into data operation.

    https://github.com/STMicroelectronics/STM32CubeL4/tree/master/Drivers/BSP/Components/mx25r6435f

    https://github.com/STMicroelectronics/32l496gdiscovery-bsp/blob/8ae27b548258d2d12109a4fd65e791f21131caf6/stm32l496g_discovery_qspi.c

    The QSPI peripheral is present in several other STM32 families, the Cube examples from those families and boards should be highly portable.

    Graduate II
    July 19, 2024

    Provide the specific pin utilization for your board implementation