I have a coldfire 52230 target, which I am debugging with a bdm usb-tap under cw 6.4 build 6. The executable is too large for ram so it's running in flash.
Everything works fine for awhile, then I can no longer program flash. Nothing changed (hardware, software, connectivity, etc.) to cause the problem and nothing fixes the problem (reboot, restart cw, different usb-tap, cycle target power, in every possible sequence thereof). Suddenly, and for no apparent reason, I can again successfully program flash. When it goes down, it is sometimes down for days or even weeks. Same for up time.
When it's down and I try to erase flash, it reports that flash is erased, but memory dumps indicate otherwise. Furthermore, when it's down and I attempt to erase, I get this log:
======================================================================
=== Execute: Erase
=== Timestamp: Wed Jan 9 14:06:04 2008
=== Flash Device: CFM_MCF52230
=== Flash Organization: 4Kx32x1
=== Flash Mem Start Addr: 0x00000000
=== Flash Mem End Addr: 0x0001FFFF
======================================================================
Using Algorithm: CFM_MCFCOMMON.elf
Loading Flash Device Driver at: 0x20000000
Flash Driver Buffer is at: 0x20001FB0
Flash Driver Buffer Size is: 0x00004050
Done
Initialization Command Succeeded
Erasing entire flash ... Done
Erase Command Succeeded
Timestamp: Wed Jan 9 14:06:06 2008
But when it's working ok and I erase flash I get this log:
======================================================================
=== Execute: Erase
=== Timestamp: Wed Jan 9 13:39:40 2008
=== Flash Device: CFM_MCF52230
=== Flash Organization: 4Kx32x1
=== Flash Mem Start Addr: 0x00000000
=== Flash Mem End Addr: 0x0001FFFF
======================================================================
Using Algorithm: CFM_MCFCOMMON.elf
Loading Flash Device Driver at: 0x20000000
Flash Driver Buffer is at: 0x20001FB0
Flash Driver Buffer Size is: 0x00004050
Done
Initialization Command Succeeded
System clock: 25000KHz
Erasing entire flash ... Done
Erase Command Succeeded
Timestamp: Wed Jan 9 13:39:47 2008
Please note that this text (and the following blank line) appears only when it's working:
System clock: 25000KHz
Here's my config file:
ResetHalt
; Set VBR.
writecontrolreg 0x0801 0x20000000
; Program RAMBAR.
writecontrolreg 0x0C05 0x20000021
; Program FLASHBAR.
writecontrolreg 0x0C04 0x00000061
; Enable PST[3:0].
writemem.b 0x40100074 0x0F
This is VERY FRUSTRATING. I've opened trouble tickets on this but the problem has always disappeared before the cause was determined. So the tickets expire and close and then the problem returns.
Am I the only developer who has seen this problem? If not, would someone from freescale please post advice here so that (1) the conversation can continue beyond the timeframe of a ticket, and (2) others might benefit from this discussion?