EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Target Communication Error (While Sending User Program)

Started by petcern March 16, 2007
Guys,
I am troubleshooting the problem where device based on RCM2100
core (512 Flash, 512 RAM) cannot start and is being power-cycled
indefinitely by the watchdog. The unit used to work fine for some
time (6 months or more) and out of the sudden we got 5 of them
displaying the same behaviour. I know for sure that firmware starts
execution since our default settings are getting written to battery
backed RAM after I reset them.
I first dumped flash contents and verified that the firmware was
not corrupted. The SysIDBlock is fine too. So I added some diagnostic
code to the firmware to ouput debug information through the serial
port. Now once I try to upload my new firmware using RFU I
get "Target communication error" (status says "Sending Program"). It
always fails after the same number of bytes (137546 out of 367836). I
tried compiling it to flash from DC 9.25 and I am getting "While
Sending User Program: Target communication error". DC always fails at
91776 out of 289920. Now, if I try to upload our original firmware
that was there when the unit failed RFU uploads it without any
problems. The size of the firmware with the diagnostic code is 450
bytes smaller than the original since I had to disable one task that
used the same serial port.
Does that imply that my flash memory is bad? Maybe guys that wrote
download managers could give me a quick explanation how user program
is written to flash. It seems to me that if the original data in
flash are the same as the data being uploaded BIOS does not update
flash. Is that correct?
Maybe someone knows why RFU is uploading 367836 bytes and DC
compiling to flash tries to upload only 289920? Does this mean that
DC does not upload BIOS even though I can see that it compiles it.
Thanks for your help! Best regards,

- Petras
I figured it out. Flash memory would not erase 1 sector (4K) and
writing to that sector would crash firmware upload process. One can
easily locate it since all other sectors with exception of sectors
occupied by SysID and User Block are deleted before writing.

Memfault Beyond the Launch