Why does the operation "Copy user program to Flash" fail?

FAQ #101570

In PG5 2.0.150 sometimes the following error message appears on execution of "Copy user program to flash": "Failed to copy to/from flash. Check Flash Memory or card is fitted".


When checking the memory map of the PCD in the "Online Debugger" after downloading a program the total size of the "User Program" (Code Size + Text Size + Extension size) differs from 1024 K bytes (1022 K bytes in the screenshot 2), this will lead to the following error message (and the backup of the program is not done):

Screenshot 1


Screenshot 2

This problem has been observed with memory cards: PCD7.R551M04, PCD7.R500 and without memory card, because this problem is not a problem of the cards but of PG5 2.0:

This behaviour is due to a problem of PG5 SP1 (2.0.150, including patch 1). PG5 2.0 tries to allocate the memory allocation in  a right way after downloading a program. It adapts automatically the size of the Code-, Text- and Extension memory  segment according to the size of the program. Unfortunately, this calculation is not always correct with PG5 2.0.150 and patch 1.
Because the  firmware versions 1.14.nn or older does not allow to execute a program backup if the allocated memory is not exactly 1024, 896, 768, 640, 512, 256 kB, the backup fails.

This allocation problem has is corrected in patch 2 of PG5 2.0 SP2 (and all later versions). However, please also update the  PCD firmware to version 1.16.27 or higher. (In the firmware versions previous to 1.16.27 there is a flag used to block the start of a second parallel backup. In case of failure, this flag can not be set back and only a system reboot will set this flag back again.)


PG5 2.0

Last update: 24.05.2015 23:12

First release: 21.02.2011 15:40

Views: 11040

The requested software / document is no longer marketed by Saia-Burgess Controls AG and without technical support. It is an older software version which can be operated only on certain now no longer commercially available products.