AnsweredAssumed Answered

Error while attempting to program MC9S08GQ4 flash through CW TCL

Question asked by Barak Manos on May 3, 2016
Latest reply on May 26, 2016 by ZhangJennie

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 ...   

Device MC9S08QG4_FLASH   

Detect frequence ...  

Frequence 4506.96 Khz  

Flash Operation.  

Error:  Erase sector failed.  Operation timeout.

UnProtecting .............

Error:  Protect Command Failed.  Operation timeout.Failed to erase sector data.

Device MC9S08QG4_FLASH   

 

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?

 

Thanks

Outcomes