Skip to main content
Tejas Doshi
Associate
May 11, 2018
Question

Flash write command error

  • May 11, 2018
  • 1 reply
  • 2319 views
Posted on May 11, 2018 at 22:55

Hello Guys, I am using STM32 L476RG microcontroller. I am trying to program it with ST Link V2 and ST link utility. The utility recognizes my microcontroller however when I try to drag and drop the code, I get a fail.TXT which syas 'Flash Write command failure' I  checked all my connections and they seem to be fine. I dont know where I am going wrong. please help me. it is driving me insane

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    May 11, 2018
    Posted on May 12, 2018 at 01:36

    The drag-n-drop is an mbed functionality, really don't think it has any relationship to the ST-LINK Utilities.

    Can you load the file with the ST-LINK Utilities?

    Is this a .BIN or .HEX file?

    How large is the file?

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Tejas Doshi
    Associate
    May 12, 2018
    Posted on May 12, 2018 at 03:19

    Hello! Thank you for your prompt reply. I tried uploading the code using ST link Utility and was unable to upload the code. I got a 'failed during verification error'. I tried the full chip erase and I got a 'Error during mass flash erase'. The ST link utility detects the MCU correctly but will not upload the code. I tried to play with the different options such as skip flash erase but to no luck. 

    Also it is a BIN file. size is 60KB. I am assuming it is not a hardware issue since the ST link detects the MCU. 

    Tesla DeLorean
    Guru
    May 12, 2018
    Posted on May 12, 2018 at 12:29

    Is this a custom board, or a DISCO, NUCLEO or EVAL board I might be familiar with?

    Some of the L4 can be in single or dual bank flash modes, you might want to check the options/settings there are coherent.

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