znyul / stm32flash

Automatically exported from code.google.com/p/stm32flash
0 stars 1 forks source link

Page-by-page erase failed #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I try to write binary file in stm32f405 flash, but can't.

What steps will reproduce the problem?
1. $ ./stm32flash -v -w image.bin -S 0x08000000:104028 /dev/ttyUSB0
Where 104028 is size of image.bin in bytes.

What is the expected output? What do you see instead?
I expect that necessary flash pages (not full flash) will be erased and 
image.bin will be writen on flash at 0x08000000 address.

Instead I've got this:

Using Parser : Raw BINARY
Interface serial_posix: 57600 8E1
Version      : 0x31
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0413 (STM32F40/1)
- RAM        : 128KiB  (8192b reserved by bootloader)
- Flash      : 1024KiB (sector size: 4x16384)
- Option RAM : 16b
- System RAM : 29KiB
Write to memory
Erasing memory
Failed to read ACK byte
Page-by-page erase failed. Check the maximum pages your device supports.
Failed to erase memory

What version of the product are you using? On what operating system?
I've used latest stm32flash (git commit 
ba7602d84be9b5f45c257c7abccc78e8257eeda5) on Ubuntu 14.04.1 LTS

If I try to load image.bin without size it work nice. But it erase full flash.

$ ./stm32flash -v -w image.bin -S 0x08000000 /dev/ttyUSB0

Original issue reported on code.google.com by alenyas...@gmail.com on 19 Dec 2014 at 9:32

GoogleCodeExporter commented 9 years ago
After I increased timeout duration all works fine

Original comment by alenyas...@gmail.com on 19 Dec 2014 at 11:20

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for your patch! It looks like the correct fix.

Original comment by lists.to...@gmail.com on 24 Feb 2015 at 9:04