While attempting to program MC9S08GQ4 flash through CW task (TCL), we are getting the following error:
fl::target -lc "MyTask"
fl::target -b 0x60 0x100
fl::target -v off -l off
cmdwin::fl::device -d "MC9S08QG4_FLASH" -o "4kx16x1" -a 0xf000 0xffff
cmdwin::fl::protect all off
Beginning Operation ...
Performing target initialization ...
Detect frequence ...
Frequence 4506.96 Khz
Error: Erase sector failed. Operation timeout.
Error: Protect Command Failed. Operation timeout.Failed to erase sector data.
When downloading (programming) it through the debugger, everything runs smoothly.
The task itself performs:
- Unprotect all sectors
- Erase all sectors
- Program image
As you can see, the 'unprotect' part fails on attempting to erase a sector (what is that supposed to mean anyway???).
The only reference I've found to this problem, is that the debugger trims the oscillator (not even sure what this means).
Any idea what could cause this problem?