cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE v1.8.0 flashing error: Data mismatch found at address

Watchdog28
Associate II

Hi,

Since I updated the STM32CubeIDE to v1.8.0 each second flash process fails with Error: Data mismatch found at address. With the STM32CubeIDE v1.6.0 everything works fine.

In the project the start address of the flash area is set to 0x08010000 because on 0x08000000 the bootloader is located.

STMicroelectronics ST-LINK GDB server. Version 6.0.0
Copyright (c) 2021, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled
        InitWhile                  : Enabled
 
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.9.0-RC01                  
      -------------------------------------------------------------------
ST-LINK SN  : 49FF67066584525744110987
ST-LINK FW  : V2J39S7
Board       : --
Voltage     : 3.24V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x469
Revision ID : Rev X
Device name : STM32G47x/G48x
Flash size  : 512 KBytes
Device type : MCU
Device CPU  : Cortex-M4
BL Version  : --
 
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a12924.srec
  File          : ST-LINK_GDB_server_a12924.srec
  Size          : 131168 Bytes
  Address       : 0x08010000 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [32 96]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:03.485
Verifying ...
 
Error: Data mismatch found at address  0x08010000 (byte = 0xFF instead of 0x00)
Error: Download verification failed
Shutting down...
Exit.

The first 8 bytes were not programmed.

0693W00000KbFiqQAF.pngMCU: STM32G474

Programmer: ST-Link/V2

On an erased flash the flash process (triggered via STM32CubeIDE Run/Debug) is working. Afterwards each second flash process fails. Maybe the problem is located in the updated STM32CubeProgrammer. I have tried different debugger settings without success.

Thanks for any help.

13 REPLIES 13

Well, you'd hope that the ST stuff is robust and tested..

Check which version of STM32 Cube Programmer command line that the IDE is using, and perhaps use that instead.

Check you are using current versions of Cube Programmer, as issues there have been addressed over time. Make sure the GUI app is using the STLDR

I'm might check my github for a perhaps safer implementation, will need to double check pin usage for the DISCO board.

@Nawres GHARBI​ please look into reliability issues of Cube IDE vs Programmer

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

See if this is more robust, uses the PB2,PB6 PD11,PD12,PE2,PD13 pins of the STM32F746G-DISCO

https://github.com/cturvey/stm32extldr/blob/main/f7_n25q128a/CLIVEONE-N25Q128A_STM32F7-PB2-PD11-PD12-PE2-PD13-PB6.stldr

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

Thanks for this, unfortunately the results with this .stldr are the same as before. I used a new DISCO board and programmed only with STM32CubeProgrammer with the following results:

0693W00000Np0GIQAZ.jpg

  15:47:54 : File download complete
  15:47:54 : Time elapsed during download operation: 00:02:10.970
  15:47:54 : Verifying ...
  15:47:54 : Read progress:
  15:48:00 : Error: Data mismatch found at address  0x90000014 (byte = 0x00 instead of 0xD8)
  15:48:00 : Error: Download verification failed
  15:48:00 : RUNNING Program ... 
  15:48:00 :   Address:      : 0x08000000
  15:48:00 : Application is running, Please Hold on...
  15:48:00 : Start operation achieved successfully

It says it started successfully, but based on the previous discussion I think this would be the STM32F746 Flash, not the external memory.

The version of programmer the IDE was using is 2.9.0-RC01 based on the GDB Server Command Line Options in the Run Configuration. Is there a download for this version? I could only find 2.9.0.

Stanford
Associate II

I also see this issue ("Data mismatch found at address....") in STM32CubeProgrammer.  To prevent this, I perform a Hardware Reset followed by a Halt of the CPU before downloading.  Do the following in STM32CubeProgrammer:

  1. Click on the CPU tab.
  2. Click the Hardware Reset button.
  3. Click the Halt button.
  4. Go back to the download tab and program your image (e.g., Start Programming button).