cancel
Showing results for 
Search instead for 
Did you mean: 

i try to flash STM32F746BG using cube programmer and ST-link V3 MINI debugger, when i click on Start flashing option the It shows download complete. But really it is not downloaded on the device. but its successful when using automatic mode. Why?

MP10
Associate II

i try to flash STM32F746BG using cube programmer and ST-link V3 MINI debugger, when i click on Start flashing option the It shows download complete. But really it is not downloaded on the device. So i go up with Start Automatic Mode option. It is successfully flashed. But when i use Normal start flashing it is not working. If anyone can explain why this happens?

8 REPLIES 8
TDK
Guru

How do you know it isn't downloaded? Use the verify option to verify flashing was successful.

If you feel a post has answered your question, please click "Accept as Solution".
MP10
Associate II

1.i have flashed a simple program for setting PH12 pin as High. So when i used "Start Programming" option, it showed download complete. But still the GPIO is not became HIGH. But when i used "Start Automatic Mode" option, the GPIO became HIGH. That's how i said Flashing is working only with Automatic mode.

2.Where is the verify option located?

TDK
Guru

Are you resetting the chip after downloading code?

There are a variety of ways to verify. Here is one of them. It sounds like you also want to run the program afterwards.

0693W00000D1PRkQAN.png

If you feel a post has answered your question, please click "Accept as Solution".
MP10
Associate II

Yes. I am resetting(Power OFF and ON) after downloading code.

Whenever i select Verify programming, it shows that 'verification failed'. But the downloading is completed.

TDK
Guru

If verification didn't succeed, it's not on the chip.

Check relevant option bytes which could be preventing it from writing. Show the log.

If you feel a post has answered your question, please click "Accept as Solution".
MP10
Associate II

log when i selected ' verify programming':

 09:26:45 : STM32CubeProgrammer API v2.8.0

 09:30:11 : ST-LINK SN : 002400085553500920393256

 09:30:11 : ST-LINK FW : V3J7M2

 09:30:11 : Board    : STLINK-V3MINI

 09:30:11 : Voltage   : 3.22V

 09:30:11 : SWD freq  : 24000 KHz

 09:30:11 : Connect mode: Normal

 09:30:11 : Reset mode : Software reset

 09:30:11 : Device ID  : 0x449

 09:30:11 : Revision ID : Rev Z

 09:30:11 : Debug in Low Power mode enabled.

 09:30:11 : UPLOADING OPTION BYTES DATA ...

 09:30:11 :  Bank     : 0x00

 09:30:11 :  Address    : 0x40023c14

 09:30:11 :  Size     : 8 Bytes

 09:30:11 : UPLOADING ...

 09:30:11 :  Size     : 1024 Bytes

 09:30:11 :  Address    : 0x8000000

 09:30:11 : Read progress:

 09:30:11 : Data read successfully

 09:30:11 : Time elapsed during the read operation is: 00:00:00.002

 09:30:50 : Memory Programming ...

 09:30:50 : Opening and parsing file: CHEETAH_30JUL21.bin

 09:30:50 :  File     : CHEETAH_30JUL21.bin

 09:30:50 :  Size     : 55980 Bytes

 09:30:50 :  Address    : 0x08000000 

 09:30:50 : Erasing memory corresponding to segment 0:

 09:30:50 : Erasing internal memory sectors [0 1]

 09:30:51 : Download in Progress:

 09:30:51 : File download complete

 09:30:51 : Time elapsed during download operation: 00:00:00.918

 09:30:51 : Verifying ...

 09:30:51 : Read progress:

 09:30:51 : Error: Data mismatch found at address 0x08006D64 (byte = 0xC4 instead of 0xCD)

 09:30:51 : Error: Download verification failed

when i selected both 'verify programming' and 'run after programming'

 09:31:51 : Memory Programming ...

 09:31:51 : Opening and parsing file: CHEETAH_30JUL21.bin

 09:31:51 :  File     : CHEETAH_30JUL21.bin

 09:31:51 :  Size     : 55980 Bytes

 09:31:51 :  Address    : 0x08000000 

 09:31:51 : Erasing memory corresponding to segment 0:

 09:31:51 : Erasing internal memory sectors [0 1]

 09:31:52 : Download in Progress:

 09:31:52 : File download complete

 09:31:52 : Time elapsed during download operation: 00:00:00.919

 09:31:52 : Verifying ...

 09:31:52 : Read progress:

 09:31:52 : Error: Data mismatch found at address 0x08006D64 (byte = 0xC4 instead of 0xCD)

 09:31:52 : Error: Download verification failed

 09:31:52 : RUNNING Program ... 

 09:31:52 :  Address:   : 0x08000000

 09:31:52 : Warning: failed to run application!

 09:31:52 : Warning: The core is kept under Reset!

 09:31:52 : Error: Start operation failed

how to check the option bytes are relevant or not?

will you please help me to know more about option bytes?. 

MP10
Associate II

0693W00000D1aUkQAJ.jpg0693W00000D1aUfQAJ.jpgwhat should be the option byte boot address?

TDK
Guru

Not real sure. Try doing a full chip erase and verify the contents of the flash starting at 0x08000000 are all 0xFF.

The "Data mismatch" error certainly shows it's not writing what you intend.

Are any other relevant option bytes set that would prevent writing? Is secure protection off? Is RDP reported as level 0?

Might try a HEX or ELF file rather than BIN.

https://community.st.com/s/question/0D50X0000C8ecKZSQY/bug-stm32cubeprogrammer-error-download-verification-failed-only-for-some-specific-file-size

If you feel a post has answered your question, please click "Accept as Solution".