Skip to main content
Explorer
March 6, 2024
Question

Algorithm for loading into external memory MT25QL512A & STM32H7

  • March 6, 2024
  • 2 replies
  • 1638 views

Hi, I'm trying to write an algorithm to load into external memory in QSPI_Dual_mode MT25QL512A for KEIL. I followed this instruction. The algorithm works BUT! when the firmware exceeds 90040001H an error occurs during verification. Smaller programs are  flashed and work fine.

Project algorithm  

Programming External Flash with STM32 Devices 

 

Error.png

    This topic has been closed for replies.

    2 replies

    Graduate II
    March 6, 2024

    So failing 256 KB in

    Either issue with Erasure, or content written incorrectly, or into the wrong location.

    You can instrument the algorithm to output diagnostic info via a serial port

    Denys_TAuthor
    Explorer
    March 6, 2024

    If you set “erase full chip” then the error disappears, apparently the problem is in erasing the sector, as I understand it, the algorithm erases only the first 2 sectors.MEM_MAP.png

    Graduate II
    March 6, 2024

    Not seeing anything egregious in there, perhaps a couple of things I'd approach differently.

    BSP_QSPI_GetStatus() only checks one IC. Needs to read 2 bytes and check both

    The erase block size will be 128KB, page write size is 512B for DUAL

    Not immediately failing, so not an errant load (Winbond / Macronix) setting Block Protection bits.

    MT25TL01G / DUAL MT25QL512A

    PB2:AF9 CLK
    PG6:AF10 NCS

    PD11:AF9 BK1_IO0
    PF9:AF10 BK1_IO1
    PF7:AF9 BK1_IO2
    PF6:AF9 BK1_IO3

    PH2:AF9 BK2_IO0
    PH3:AF9 BK2_IO1
    PG9:AF9 BK2_IO2
    PG14:AF9 BK2_IO3

    Not spent a lot of time on these as ST provides programmer for these parts as they use them. Will check the build system when I get home as I have other FLM / STLDR projects.

    Graduate II
    March 7, 2024